|
y_pred = y_pred.view(batch_size, n_class, -1) |
Hi all,
I got view-size-is-not-compatible-with-input-tensors-size-and-stride error when using confusion_matrix.
Should we consider replacing view with reshape? or enforce contiguous() before view() operator? The reference is below.
https://discuss.pytorch.org/t/view-size-is-not-compatible-with-input-tensors-size-and-stride/121488/2?u=joeycho
MONAI/monai/metrics/confusion_matrix.py
Line 166 in a05c202
Hi all,
I got
view-size-is-not-compatible-with-input-tensors-size-and-strideerror when using confusion_matrix.Should we consider replacing view with reshape? or enforce contiguous() before view() operator? The reference is below.
https://discuss.pytorch.org/t/view-size-is-not-compatible-with-input-tensors-size-and-stride/121488/2?u=joeycho