'block': NetForPackInput(P.Pack(axis=-2)), 'desc_inputs':[[3, 2, 3], [3, 2, 3], [3, 2, 3]], 'desc_bprop':[[3, 2, 3, 3]], }), ('Pack_2', { 'block': NetForPackInput(P.Pack()), 'desc_inputs':[[2, 2]], 'desc_bprop':[[2, 2, 2]], }), ('Pack_3', { 'block': NetForPackInput(P.Pack()), 'desc_inputs':[[128, 128], [128, 128]], 'desc_bprop':[[2, 128, 128]], }), ('Unpack_0', { 'block': NetForUnpackInput(P.Unpack(axis=0)), 'desc_inputs':[[2, 4]], 'desc_bprop':[[4], [4]], }), ('Unpack_1', { 'block': NetForUnpackInput(P.Unpack(axis=-1)), 'desc_inputs':[Tensor(np.array([[1, 1, 1]], np.float32))], 'desc_bprop':[[1], [1], [1]], }), ('Diag', { 'block': P.Diag(), 'desc_inputs': [[4]], 'desc_bprop': [[4, 4]], }), ('DiagPart', { 'block': P.DiagPart(),
def __init__(self): super(UnpackNet, self).__init__() self.unpack = P.Unpack()