class_docstr: Same as `loss_cls`, but flattens input and target.
docstr: Move `self.axis` to the last dimension and ensure tensor is contigous for `Tensor` otherwise just return
docstr_tok: ["Move","`","self.axis","`","to","the","last","dimension","and","ensure","tensor","is","contigous","for","`","Tensor","`","otherwise","just","return"]
code: def _contiguous(self, x: Tensor) -> TensorBase:
      "Move `self.axis` to the last dimension and ensure tensor is contigous for `Tensor` otherwise just return"
      return (
          TensorBase(x.transpose(self.axis, -1).contiguous())
          if isinstance(x, torch.Tensor)
          else x
      )
  
imports: from __future__ import annotations
  from .imports import *
  from .torch_imports import *
  from .torch_core import *
  from .layers import *
label_desc: Use image node_id 5 for calling the BaseLoss obj's underlying member method code with example usage: obj._contiguous(x) and returns: unknown