trw.layers.flatten
Flatten
Flatten a tensor
Bases: torch.nn.Module
torch.nn.Module
For example, a tensor of shape[N, Z, Y, X] will be reshaped [N, Z * Y * X]
x – a tensor
Returns: return a flattened tensor