Comments (4)
Thanks for your answer and support. I tried updating PIL from 5.4.1 to 7.0.0, and executing the code inside a virtual environment but still the same problem occurs.
Here are the package version (Python 3.7 is used)
(e2cnn_2) karl@IT-LL-karbe297:~$ pip list
Package Version
attrs 19.3.0
backcall 0.1.0
bleach 3.1.0
decorator 4.4.1
defusedxml 0.6.0
e2cnn 0.1
entrypoints 0.3
importlib-metadata 1.4.0
ipykernel 5.1.3
ipython 7.11.1
ipython-genutils 0.2.0
jedi 0.15.2
Jinja2 2.10.3
json5 0.8.5
jsonschema 3.2.0
jupyter-client 5.3.4
jupyter-core 4.6.1
jupyterlab 1.2.5
jupyterlab-server 1.0.6
MarkupSafe 1.1.1
mistune 0.8.4
more-itertools 8.1.0
nbconvert 5.6.1
nbformat 5.0.3
notebook 6.0.2
numpy 1.18.1
pandocfilters 1.4.2
parso 0.5.2
pexpect 4.7.0
pickleshare 0.7.5
Pillow 7.0.0
pip 20.0.1
pkg-resources 0.0.0
prometheus-client 0.7.1
prompt-toolkit 3.0.2
ptyprocess 0.6.0
Pygments 2.5.2
pyrsistent 0.15.7
python-dateutil 2.8.1
pyzmq 18.1.1
scipy 1.4.1
Send2Trash 1.5.0
setuptools 45.1.0
six 1.14.0
terminado 0.8.3
testpath 0.4.4
torch 1.4.0
torchvision 0.5.0
tornado 6.0.3
traitlets 4.3.3
wcwidth 0.1.8
webencodings 0.5.1
wheel 0.33.6
zipp 2.0.0
from e2cnn.
Hi @Tarnekar! I am happy you liked our work!
Unfortunately, I have never had this problem.
It seems its source is in Pytorch's code where PIL functionalities are used.
Is it possible that you have an old version of PIL which is not fully compatible with your current version of torchvision?
Could you give some more details about your Python environment?
from e2cnn.
That was indeed the problem; using torch 1.3, torchvision 0.4 and pillow 6.2.1 and all the code runs. Although there is a warning that torchvision 0.4.0 has a requirement of torch==1.2.0.
Thanks!
from e2cnn.
I was indeed able to reproduce your problem.
Using torch
1.3 and torchvision
0.4 (and pillow
6.2.1), the following code runs.
However, I get your error when I update to the newest (recently released) versions of torch
(1.4) and torchvision
(0.5).
import torch
from torch.utils.data import DataLoader
from torchvision.transforms import RandomRotation
from torchvision.transforms import ToTensor
from torchvision.transforms import Compose
from torchvision.datasets import MNIST
from PIL import Image
transform = Compose([
RandomRotation(180., resample=Image.BILINEAR, expand=False),
ToTensor(),
])
mnist = MNIST("./", train=True, transform=transform, download=True)
train_loader = DataLoader(mnist, batch_size=1)
for x, t in enumerate(train_loader):
print("hello world")
break
For this reason, I think this is a problem with the new version of Pytorch.
I would suggest you to temporarily downgrade it to 1.3 if you want to use transforms.RandomRotation
.
You can probably find more support on Pytorch's forum.
Hope this helps!
from e2cnn.
Related Issues (20)
- wrapping pytorch operations - grid_sample HOT 4
- Import Error with Torch 1.9.0+cu111 HOT 2
- equivariant Transformer HOT 5
- ZeroPad2D on GeometricTensor
- Cannot pass weights of R2Conv as a positional argument HOT 2
- Counting FLOPs for e2cnn HOT 1
- equivariance in C8 space HOT 1
- Module export HOT 3
- About the equivalence of wide_resnet HOT 5
- Need a size parameter for e2cnn.R2Upsampling Class HOT 1
- about attribute R2conv.filter HOT 2
- Learning of kernels HOT 2
- O(2) group, irreps, and PyTorch DDP. HOT 2
- checking equivariance for the angles that are not 90n HOT 2
- about to set special rotation equivariant HOT 2
- Cannot import name container_abcs in python 3.6 version (e2cnn_py36)
- shriking size of output image
- Use of np.float and np.int etc
- Difference between trivial output type and regular output type with group pooling HOT 1
- Export Linear HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from e2cnn.