I am running pytorch 0.3.0.post4
on Ubuntu 14.04 (conda 4.3.25, python 3.6.2, cuda 8.0).
Here is what I get when importing torchvision.transforms
>>> from torchvision import transforms
>>> dir(transforms)
['CenterCrop',
'Compose',
'Image',
'ImageOps',
'Lambda',
'Normalize',
'Pad',
'RandomCrop',
'RandomHorizontalFlip',
'RandomSizedCrop',
'Scale',
'ToPILImage',
'ToTensor',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__spec__',
'division',
'math',
'np',
'numbers',
'random',
'torch',
'types']
As you can see most of the transforms currently documented are missing, resulting in AttributeError
s such as this one
>>> transforms.RandomResizedCrop(224)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-9-5275ac2684b6> in <module>()
----> 1 transforms.RandomResizedCrop(224)
AttributeError: module 'torchvision.transforms' has no attribute 'RandomResizedCrop'
Am I not using the latest pytorch version or am I missing something very basic here?
Thanks for the help in advance!