AttributeError: module 'torchvision.ops._utils' has no attribute 'split_normalization_params'
See original GitHub issue🐛 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
The problem is you are using the latest training scripts on main branch with and old torchvision version (0.11.3). This method does not exist on 0.11.3. I’ve added it in late October last year which was past the branch cut for v0.11 (see #4493). I’m pretty sure you will find it on the latest nightly of torchvision because its been on our main branch for months.
I recommend to check again the versions that you are using when installing the nightly. I’ll close the issue but if you face more problems let me know.
Okay. Thank you so much. I was following the article because I am using the recipe for research and wanted to know how the various parts contribute to the overall metric just as in the article.