Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: MirrorTransform now takes the axes as the spatial dimensions. #2

Open
bahetibhakti opened this issue Jan 31, 2019 · 2 comments

Comments

@bahetibhakti
Copy link

I installed all the required dependancies and tried hard to run the code but stuck at following error. Please help

Reading from /home/gpu3/prob_unet/output/quarter/train/stuttgart
Reading from /home/gpu3/prob_unet/output/quarter/train/weimar
Reading from /home/gpu3/prob_unet/output/quarter/train/jena
Reading from /home/gpu3/prob_unet/output/quarter/train/aachen
Reading from /home/gpu3/prob_unet/output/quarter/train/bochum
Reading from /home/gpu3/prob_unet/output/quarter/train/hanover
Reading from /home/gpu3/prob_unet/output/quarter/train/tubingen
Reading from /home/gpu3/prob_unet/output/quarter/train/erfurt
Reading from /home/gpu3/prob_unet/output/quarter/train/bremen
Reading from /home/gpu3/prob_unet/output/quarter/train/zurich
Reading from /home/gpu3/prob_unet/output/quarter/train/hamburg
Reading from /home/gpu3/prob_unet/output/quarter/train/dusseldorf
Reading from /home/gpu3/prob_unet/output/quarter/train/cologne
Reading from /home/gpu3/prob_unet/output/quarter/train/strasbourg
Reading from /home/gpu3/prob_unet/output/quarter/train/krefeld
train set comprises 2701 files.
Traceback (most recent call last):
File "train_prob_unet.py", line 188, in
train(cf)
File "train_prob_unet.py", line 39, in train
data_provider = get_train_generators(cf)
File "/home/gpu3/probabilistic_unet/training/data/cityscapes/data_loader.py", line 335, in get_train_generators
n_batches=cf.n_train_batches)
File "/home/gpu3/probabilistic_unet/training/data/cityscapes/data_loader.py", line 300, in create_data_gen_pipeline
mirror_transform = MirrorTransform(axes=(3,))
File "/home/gpu3/probabilistic_unet/training/batchgenerators/transforms/spatial_transforms.py", line 192, in init
raise ValueError("MirrorTransform now takes the axes as the spatial dimensions. What previously was "
ValueError: MirrorTransform now takes the axes as the spatial dimensions. What previously was axes=(2, 3, 4) to mirror along all spatial dimensions of a 5d tensor (b, c, x, y, z) is now axes=(0, 1, 2). Please adapt your scripts accordingly.

@BrianDo2005
Copy link

Hi @bahetibhakti
Have you found out the solution for the above error? I encounter the same error.

@hajtos
Copy link

hajtos commented Jun 24, 2019

I know that this is a bit late for an answer, but replacing line 300 from file probabilistic_unet/training/data/cityscapes/data_loader.py from:
mirror_transform = MirrorTransform(axes=(3,))
to:
mirror_transform = MirrorTransform(axes=(1,))
fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants