jlevy44 / PathFlow-MixMatch

Don't mix, match! Simple utilities for improved registration of Histopathology Whole Slide Images.
10 stars 6 forks source link

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! #27

Open gmh1033286494 opened 3 years ago

gmh1033286494 commented 3 years ago

I tried with 2 groups of image, 10001000 and 20482048. 10001000 worked just fine but 20482048 report the runtime error:Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

_pathflow-mixmatch register_images --im1 match_fixed_dapi_23093_2048.png --im2 match_area_original_moving_dapi_23093_2048.png --fix_rotation False --output_dir output_registered_images/ --gpu_device 0 --transform_type rigid --lr 0.01 --iterations 1000 --min_object_size 500 --no_segment_analysis True --blackbackground True

I tried another group of images of 2048*2048, it worked fine, too. I don't know what triggered this error.

jlevy44 commented 3 years ago

I couldn't say, that is a strange error.. You are welcome to pull and PR if you are able to debug further! We do have plans to modify the package with additional features and fix current bugs, but is not a high priority at this moment.