RaphaelOlivier / robust_speech

Apache License 2.0
38 stars 14 forks source link

Fix for evaluation loss calculation #10

Closed ugorsahin closed 10 months ago

ugorsahin commented 1 year ago

In the loss evaluation, using the Stage.TRAIN mode causes the compute_objectives to fail as given below

return torch._C._nn.nll_loss_nd(input, target, weight, _Reduction.get_enum(reduction), ignore_index)                                                                                                  
RuntimeError: 0D or 1D target tensor expected, multi-target not supported

Therefore, I changed the Stage.TRAIN to Stage.VALID.