I have used 5 images that have previously work and wanted to see if I can reduce the z stack of the image. I used zen to take the images from 50+ stacks to a reduced number to see how the prediction would work. When using my previously trained model on these new images at a reduced z stack, I get the error:
DEBUG: cropper shape change [0, 544, 544] becomes (0, 544, 544)
Traceback (most recent call last):
File "predict.py", line 118, in
main()
File "predict.py", line 90, in main
data = [torch.unsqueeze(d, 0) for d in dataset[idx]] # make batch of size 1
File "/home/ec2-user/pytorch_fnet-release_1/fnet/data/czidataset.py", line 52, in getitem
im_out = [torch.unsqueeze(im, 0) for im in im_out]
File "/home/ec2-user/pytorch_fnet-release_1/fnet/data/czidataset.py", line 52, in
im_out = [torch.unsqueeze(im, 0) for im in im_out]
RuntimeError: cannot unsqueeze empty tensor
Description
A clear description of the bug
I have used 5 images that have previously work and wanted to see if I can reduce the z stack of the image. I used zen to take the images from 50+ stacks to a reduced number to see how the prediction would work. When using my previously trained model on these new images at a reduced z stack, I get the error:
DEBUG: cropper shape change [0, 544, 544] becomes (0, 544, 544) Traceback (most recent call last): File "predict.py", line 118, in
main()
File "predict.py", line 90, in main
data = [torch.unsqueeze(d, 0) for d in dataset[idx]] # make batch of size 1
File "/home/ec2-user/pytorch_fnet-release_1/fnet/data/czidataset.py", line 52, in getitem
im_out = [torch.unsqueeze(im, 0) for im in im_out]
File "/home/ec2-user/pytorch_fnet-release_1/fnet/data/czidataset.py", line 52, in
im_out = [torch.unsqueeze(im, 0) for im in im_out]
RuntimeError: cannot unsqueeze empty tensor
Expected Behavior
What did you expect to happen instead?
i expect an image to be outputted
Reproduction
A minimal example that exhibits the behavior.
original and reduced image attached
Environment
Any additional information about your environment
environment is the same as the published paper