Closed EndritPJ closed 4 years ago
Update: Looks like the training is working now, I manually changed the label numbering in the .nii.gz files to be sequential, though it could also be done with a script. I'm still curious to know as to why it wasn't training before if anyone has any further explanations.
Hi,
I'm having an issue training a model to segment 5 different classes. The dataset I'm using contains 10 MRI images each with 5 different labels. These labels are consistent for each instance (I checked in the .nii.gz files).
The labels are as follows: 0 1 2 64 71
When I train for 3 classes (0, 1 and 2) the training works fine. When I train for 5, I get the below error.
InvalidArgumentError (see above for traceback): Provided indices are out-of-bounds w.r.t. dense side with broadcasted shape
From looking at past posts, I changed my config and histogram ref files, yet I still cannot train. Is it an issue with the labels not being in a sequential order?
Running this generated a histogram_ref_file.txt, but then failed at the first iteration of training. I then added 2 lines to the histogram .txt, and it looks like so:
The
histogram_ref_file
points to the correct location, which should enforce the labels to be 0 1 2 3 4. Thenum_classes=5
. My .nii.gz files all have consistent labeling. Can anyone suggest why the training is failing?