Skip to content

AttributeError: module 'torchvision.ops._utils' has no attribute 'split_normalization_params' #5456

Closed
@etetteh

Description

@etetteh

🐛 Describe the bug

Currently using torchvision==0.11.3, and following the training recipe [here](https://github.com/pytorch/vision/blob/main/references/classification/train.py). I get the following error, and by looking at the methods in the version of torchvision I have, it isn't available. The Nightly` version doesn't contain it either.

Traceback (most recent call last):
  File "/Users/en_tetteh/miniforge3/envs/venv_ivadomed/bin/ivadomed", line 33, in <module>
    sys.exit(load_entry_point('ivadomed', 'console_scripts', 'ivadomed')())
  File "/Users/en_tetteh/NEUROPOLY/ivadomed/ivadomed/main.py", line 593, in run_main
    run_command(context=context,
  File "/Users/en_tetteh/NEUROPOLY/ivadomed/ivadomed/main.py", line 429, in run_command
    best_training_dice, best_training_loss, best_validation_dice, best_validation_loss = imed_training.train(
  File "/Users/en_tetteh/NEUROPOLY/ivadomed/ivadomed/training.py", line 117, in train
    param_groups = torchvision.ops._utils.split_normalization_params(model)
AttributeError: module 'torchvision.ops._utils' has no attribute 'split_normalization_params'

Versions

Collecting environment information...
PyTorch version: 1.10.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.2.1 (arm64)
GCC version: Could not collect
Clang version: 13.0.0 (clang-1300.0.29.30)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.10 | packaged by conda-forge | (main, Feb 1 2022, 21:25:34) [Clang 11.1.0 ] (64-bit runtime)
Python platform: macOS-12.2.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.22.2
[pip3] torch==1.10.2
[pip3] torchio==0.18.73
[pip3] torchvision==0.11.3
[conda] cpuonly 1.0 0 pytorch-nightly
[conda] numpy 1.22.2 py39h61a45d2_0 conda-forge
[conda] torch 1.10.2 pypi_0 pypi
[conda] torchio 0.18.73 pypi_0 pypi
[conda] torchvision 0.11.3 pypi_0 pypi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions