def mnp_reshape(input_tensor): a = mnp.reshape(input_tensor, (3, 8)) b = mnp.reshape(input_tensor, [3, -1]) c = mnp.reshape(input_tensor, (-1, 12)) d = mnp.reshape(input_tensor, (-1, )) e = mnp.reshape(input_tensor, 24) f = mnp.reshape(input_tensor, [2, 4, -1]) return a, b, c, d, e, f
def mnp_reshape(input_tensor): a = mnp.reshape(input_tensor, (3, 8)) b = mnp.reshape(input_tensor, [3, -1]) c = mnp.reshape(input_tensor, (-1, 12)) d = mnp.reshape(input_tensor, (-1,)) e = mnp.reshape(input_tensor, 24) f = mnp.reshape(input_tensor, [2, 4, -1]) g = input_tensor.reshape(3, 8) h = input_tensor.reshape(3, -1) i = input_tensor.reshape([-1, 3]) j = input_tensor.reshape(-1) return a, b, c, d, e, f, g, h, i, j
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