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

N foreground 0, N background 52003401,unable to generate class balanced samples. NaN or Inf found in input tensor. #388

Open
shanpriya3 opened this issue May 29, 2024 · 0 comments

Comments

@shanpriya3
Copy link

I am training UNETR model in a custom dataset with labels =0,1,2.

When I train my model using
python main.py
--in_channels=1
--out_channels=3
--space_x=1.0
--space_y=1.0
--space_z=1.0
--feature_size=32
--batch_size=1
--logdir=unetrmonai_test
--optim_lr=1e-4
--lrschedule=warmup_cosine
--infer_overlap=0.5
--save_checkpoint
--data_dir=/cluster/home/shan/ves/research-contributions/UNETR/BTCV/dataset/us/

I am getting the following issues,
"N foreground 0, N background 52003401,unable to generate class balanced samples.
NaN or Inf found in input tensor".

I checked the labels, they are integer values (0,1,2). I am using --out_channels=3.
Please let me know what is the issue here. Thanks!

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