You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, none of the indices expose their inherited property keepdim. For some cases this might be useful.
Rationale
Without the usage of keepdim=True on the augmentations, my CrossEntropyLoss fails with RuntimeError: only batches of spatial targets supported (3D tensors) but got targets of dimension: [batch_size, 1, H, W], because an additional dimension is added.
Implementation
Expose keepdim: bool=False in __init()__
Alternatives
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
I agree, was quite flattered that some deep base augmentation class would for some reason add a completely unnecessary dimension. Anyway, some form of (by default keepdim=True) option and/or hint would be beneficial. Took me some time to debug that.
Summary
Currently, none of the indices expose their inherited property
keepdim
. For some cases this might be useful.Rationale
Without the usage of
keepdim=True
on the augmentations, my CrossEntropyLoss fails withRuntimeError: only batches of spatial targets supported (3D tensors) but got targets of dimension: [batch_size, 1, H, W]
, because an additional dimension is added.Implementation
Expose
keepdim: bool=False
in__init()__
Alternatives
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: