ERROR:Calculating masked map-map CCs at representative latent encodings for epochs
Describe the bug
(INFO) (analyze_convergence.py) (10-Jan-24 13:15:04) Calculating masked map-map CCs at representative latent encodings for epochs [ 4 9 14 19 24 29 34 39 40] ...
Traceback (most recent call last):
File "/data2/xyy/cryodrgn_test/cryodrgn/utils/analyze_convergence.py", line 1251, in
- (*, torch.dtype dtype)
- (tuple of ints dim, bool keepdim, *, torch.dtype dtype)
- (tuple of names dim, bool keepdim, *, torch.dtype dtype)
To Reproduce following Nature Protocols step7: python /path/to/cryodrgn/utils/analyze_convergence.py 01_128_8D_256 40
Additional context the plots generated under ./cryodrgn_test/01_128_8D_256/convergence.40/plots: -rw-rw-r--. 1 user user 60757 Jan 10 13:03 00_total_loss.png -rw-rw-r--. 1 user user 854221 Jan 10 13:10 01_encoder_umaps.png -rw-rw-r--. 1 user user 116268 Jan 10 13:10 02_encoder_latent_vector_shifts.png -rw-rw-r--. 1 user user 440947 Jan 10 13:10 03_decoder_UMAP-sketching.png -rw-rw-r--. 1 user user 891581 Jan 10 13:10 04_decoder_maxima-sketch-consistency.png
I had the same issue. I have fixed it by adding code to change torch tensor to numpy array before zmean1 = vol1 - np.mean(vol1).
The code I added is
vol1= vol1.detach().numpy()
vol2 = vol2.detach().numpy()