p2irc / deepplantphenomics

Deep learning for plant phenotyping.
GNU General Public License v2.0
133 stars 46 forks source link

compute_full_test_accuracy fails for classification #27

Closed jubbens closed 5 years ago

jubbens commented 5 years ago

Got this message after training the cifar10 example:

Traceback (most recent call last):
  File "/home/jordan/deepplantphenomics/cifar10_classification.py", line 46, in <module>
    model.begin_training()
  File "/home/jordan/deepplantphenomics/deepplantphenomics/deepplantpheno.py", line 1279, in begin_training
    final_test_loss = self.compute_full_test_accuracy()
  File "/home/jordan/deepplantphenomics/deepplantphenomics/deepplantpheno.py", line 1425, in compute_full_test_accuracy
    all_losses = all_losses[mask_extra, ...]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 0 but corresponding boolean dimension is 16000
jubbens commented 5 years ago

Fixed in eebe3e0.