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

Can't get attribute 'BasicConv2d' on module 'topaz.model.features.resnet' #224

Open
asarnow opened this issue Jan 30, 2025 · 0 comments
Open

Comments

@asarnow
Copy link

asarnow commented Jan 30, 2025

I'm seeing this error with topaz 0.3.7, but topaz 0.2.5 works fine with the same command. Is it because the model was trained with the older version?

The command was originally generated by the cryoSPARC wrapper but I am running it directly, using the topaz conda environment.

(topaz-0.3.7) host:/path$ topaz extract --radius 28 --threshold -6 --up-scale 4 --assignment-radius -1 --min-radius 5 --max-radius 100 --step-radius 5 --num-workers 4 --device 0 --model model_epoch48.sav -o topaz_particles_prediction.txt X-2Y-2-2_aligned_mic_DW.mrc X+0Y+0-2_aligned_mic_DW.mrc X-1Y+0-3_aligned_mic_DW.mrc

# Beginning extraction
Traceback (most recent call last):
  File "/apps/software/miniforge3/envs/topaz-0.3.7/bin/topaz", line 33, in <module>
    sys.exit(load_entry_point('topaz-em==0.3.7', 'console_scripts', 'topaz')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/site-packages/topaz/main.py", line 148, in main
    args.func(args)
  File "/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/site-packages/topaz/commands/extract.py", line 64, in main
    extract_particles(args.paths, args.model, args.device, args.batch_size, args.threshold, args.radius, args.num_workers,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/site-packages/topaz/extract.py", line 333, in extract_particles
    for path,score,coords in nms_iterator(stream, radius, threshold, pool=pool, dims=dims, verbose=verbose):
  File "/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/site-packages/topaz/extract.py", line 99, in nms_iterator
    for name,score,coords in pool.imap_unordered(process, paths_scores):
  File "/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/multiprocessing/pool.py", line 873, in next
    raise value
AttributeError: Can't get attribute 'BasicConv2d' on <module 'topaz.model.features.resnet' from '/apps/software/miniforge3/envs/topaz-0.3.7/lib/python3.11/site-packages/topaz/model/features/resnet.py'>
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

1 participant