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

Getting nans in reconstruction, adversarial losses #62

Open
ahummels opened this issue Nov 18, 2024 · 0 comments
Open

Getting nans in reconstruction, adversarial losses #62

ahummels opened this issue Nov 18, 2024 · 0 comments

Comments

@ahummels
Copy link

ahummels commented Nov 18, 2024

Have been trying to run a hyperparameter sweep to use CPA but have been running into the same error as #36 . I also saw that I was getting outputs of "NaN or Inf in input tensor" but have done extensive testing and know I don't have either in my initial dataset. But when I looked at my training losses I saw that both the reconstruction and adversarial losses were nans as follows

[[34mINFO
[[0m Generating sequential column names
[[34mINFO
[[0m Generating sequential column names
Training:   0%|          | 0/200 [00:00<?, ?it/s]
Epoch 1/200:   0%|          | 0/200 [00:00<?, ?it/s]
Epoch 1/200:   0%|          | 1/200 [23:33<78:08:05, 1413.50s/it]
Epoch 1/200:   0%|          | 1/200 [23:33<78:08:05, 1413.50s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00859, acc_cellIDs=0.0819]
Epoch 2/200:   0%|          | 1/200 [23:33<78:08:05, 1413.50s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00859, acc_cellIDs=0.0819]
Epoch 2/200:   1%|          | 2/200 [47:19<78:07:55, 1420.58s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00859, acc_cellIDs=0.0819]
Epoch 2/200:   1%|          | 2/200 [47:19<78:07:55, 1420.58s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00857, acc_cellIDs=0.0819]
Epoch 3/200:   1%|          | 2/200 [47:19<78:07:55, 1420.58s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00857, acc_cellIDs=0.0819]
Epoch 3/200:   2%|▏         | 3/200 [1:10:30<77:00:15, 1407.19s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00857, acc_cellIDs=0.0819]
Epoch 3/200:   2%|▏         | 3/200 [1:10:30<77:00:15, 1407.19s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00855, acc_cellIDs=0.0819]
Epoch 4/200:   2%|▏         | 3/200 [1:10:30<77:00:15, 1407.19s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00855, acc_cellIDs=0.0819]
Epoch 4/200:   2%|▏         | 4/200 [1:33:38<76:11:55, 1399.57s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00855, acc_cellIDs=0.0819]
Epoch 4/200:   2%|▏         | 4/200 [1:33:38<76:11:55, 1399.57s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00849, acc_cellIDs=0.0819]
Epoch 5/200:   2%|▏         | 4/200 [1:33:38<76:11:55, 1399.57s/it, v_num=0, recon=nan, r2_mean=-70.7, adv_loss=nan, acc_pert=0.00849, acc_cellIDs=0.0819]

And the specific sweep would fail at epoch 5 because that's what my check_val_every_n_epoch was set to. I'm guessing that the output about the NaNs/Infs are pointing towards these losses but maybe there's something else going on? My adv_loss was set to cce and I was using your tune_script.py - any idea why I'd fail to get reconstruction and adversarial losses? Happy to provide more information as it would be useful.

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