Turns out, fastai library has loss-function that digests tensors of any shapes by flattening them:
They’re called MSELossFlat, CrossEntropyLossFlat etc
Turns out, fastai library has loss-function that digests tensors of any shapes by flattening them:
They’re called MSELossFlat, CrossEntropyLossFlat etc