🐛 Bug
Describe the bug
I 'm training model with 2 class. Error appears at line 61 in metrics/accuracy.py. By default, maxk always equal 5 because topk is fixed (1,5) in train_step and val_step function. output variable shape is 32x4 so result in error RuntimeError: invalid argument 5: k not in range for dimension
59 maxk = max(topk)
60 batch_size = target.size(0)
61 _, pred = output.topk(maxk, 1, True, True)
62 pred = pred.t()
63 correct = pred.eq(target.view(1, -1).expand_as(pred))
To Reproduce
Steps to reproduce the behavior:
Just train model using engine.fit with 2 classes
Expected behavior
training process works with arbitrary number of output class
Screenshots

Desktop (please complete the following information):
Additional context
@vpeopleonatank
🐛 Bug
Describe the bug
I 'm training model with 2 class. Error appears at line 61 in
metrics/accuracy.py. By default,maxkalways equal 5 becausetopkis fixed(1,5)intrain_stepandval_stepfunction.outputvariable shape is32x4so result in errorRuntimeError: invalid argument 5: k not in range for dimensionTo Reproduce
Steps to reproduce the behavior:
Just train model using
engine.fitwith 2 classesExpected behavior
training process works with arbitrary number of output class
Screenshots

Desktop (please complete the following information):
Additional context
@vpeopleonatank