def mnp_squeeze(input_tensor): a = mnp.squeeze(input_tensor) b = mnp.squeeze(input_tensor, 0) c = mnp.squeeze(input_tensor, axis=None) d = mnp.squeeze(input_tensor, axis=-3) e = mnp.squeeze(input_tensor, (2,)) f = mnp.squeeze(input_tensor, (0, 2)) return a, b, c, d, e, f
def construct(self, x): x = mnp.expand_dims(x, 2) x = mnp.reshape(x, (1, 2, 3, 4, 1, 1)) x = mnp.squeeze(x) return x
def squeeze(data, axis=None): return mnp.squeeze(data, axis)