Still can't make Step 5 right #11
Replies: 2 comments 4 replies
-
|
Hi, Regarding the running time, could you try adding the option "--dataloader_num_workers 0" when using "cryopros-train"? For example: cryopros-train This may improve the running speed. On our server with 4x V100 GPUs, it takes about 10 minutes for 1000 iterations. |
Beta Was this translation helpful? Give feedback.
-
|
KL loss looks alright. I will try --dataloader_num_workers 0 next time.
There are warnings when running cryopros-generate:
/opt/miniconda3/envs/cryopros/lib/python3.12/site-packages/torch/nn/functional.py:4404: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn(
/opt/miniconda3/envs/cryopros/lib/python3.12/site-packages/torch/nn/functional.py:4343: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn(
I wonder if this is the case.
------------------ Original ------------------
From: ***@***.***>;
Date: Fri, Jun 21, 2024 02:50 PM
To: ***@***.***>;
Cc: ***@***.***>; ***@***.***>;
Subject: Re: [mxhulab/cryopros] Still can't make Step 5 right (Discussion #11)
Hi,
May I take a look at the log file? It should be located in ./generate/{task_name}/train.log. I suspect you might be encountering the posterior collapse issue, where the KL loss is extremely low (approximately 1e-9). This is a frequent issue when training a VAE model. Typically, rerunning the training procedure will resolve this problem. The expected KL loss is usually around 1e-4 or 2e-4. If this is not the case, please rerun the "cryopros-train" program.
Regarding the running time, could you try adding the option "--dataloader_num_workers 0" when using "cryopros-train"? For example:
cryopros-train
--opt /opt/miniconda3/envs/cryopros/lib/python3.12/site-packages/cryoPROS/options/train.json
--gpu_ids 0 1 2 3
--task_name HAtrimer_iteration_1
--box_size 168
--Apix 1.245
--volume_scale 50
--init_volume_path J53_008_volume_map_lowpass13.mrc
--data_path J53particle_stack.mrcs
--param_path J53particle_stack.star
--invert
--dataloader_batch_size 8
--dataloader_num_workers 0
This may improve the running speed. On our server with 4x V100 GPUs, it takes about 10 minutes for 1000 iterations.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a CryoSPARC project with preferred orientation problem. After Referenced Based Motion Correction, overall resolution reaches 3.80Å, while worst orientation resolution is about 8Å. I use this command to combine particle stacks:
relion_stack_create --i autorefinement_mrcs.star --o J53particle_stack
Then start step 4 using commands:
cryopros-train
--opt /opt/miniconda3/envs/cryopros/lib/python3.12/site-packages/cryoPROS/options/train.json
--gpu_ids 0 1 2 3
--task_name HAtrimer_iteration_1
--box_size 168
--Apix 1.245
--volume_scale 50
--init_volume_path J53_008_volume_map_lowpass13.mrc
--data_path J53particle_stack.mrcs
--param_path J53particle_stack.star
--invert
--dataloader_batch_size 8
We have about 140000 particles, each 1000 iterations took about 2.5 hours on 4 GTX3090 GPUs. While it is still training, I continue to try step 5 with these commands:
cryopros-uniform-pose
--input ./J53particle_stack.star
--output ./unipose.star
cryopros-generate
--model_path /storage_data/data_s/CS-20240523-pdcovrbd-3f7-9c1/cryopros/generate/HAtrimer_iteration_1/models/10000.pth
--output_path generated_HAtrimer_iteration_1
--gen_name HAtrimer_iteration_1_generated_particles.mrcs
--batch_size 50
--box_size 168
--Apix 1.245
--param_path unipose.star
--invert
--gen_mode 0
The unipose.star looks like it works as intended, but the created particles looks quite wrong,


and their 2D Classes looks even worse,
I'm not quite sure about the vim command, so I change all "J53particle_stack.mrcs" to "generated_HAtrimer_iteration_1/HAtrimer_iteration_1_generated_particles.mrcs" in Notepad++, then import the modified star file to CryoSPARC.
I think the 10000 iterations model should output decent results, and the 13Å lowpassed volume could be enough. I also tried gen_mode 1, but created particles always look like stars in the sky, not actual particles.
Any idea how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions