from albumentations.pytorch.transforms import ToTensorV2
I used the above code, and it doesn't work.
Just add a code block with the line
! pip install albumentations==0.4.6
above the block where you do the import. I tried installing it without the specific version and it failed.
When i did not specify the version number in pip install, version 0.1.12 was installed which does not contain ToTensorV2.
Ensure that you have the latest version
!pip install --upgrade --force-reinstall --no-deps albumentations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With