def __init__(self, inputx, indices, updates): super(TestScatterAddDynamicNet, self).__init__() self.scatter_add = P.ScatterAdd() self.test_dynamic = inner.GpuConvertToDynamicShape() self.inputx = Parameter(inputx, name="inputx") self.indices = Parameter(indices, name="indices") self.updates = Parameter(updates, name="updates")
def __init__(self, axis=0, dyn_a=True, dyn_b=True): super(GatherNetDynamic, self).__init__() self.gather = P.Gather() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape() self.to_dyn_1 = dyn_a self.to_dyn_2 = dyn_b self.axis = axis
def __init__(self, num_segments, dyn_a=True, dyn_b=True): super(UnsortedSegmentMaxDynNet, self).__init__() self.unsorted_segment_max = P.UnsortedSegmentMax() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape() self.num_segments = num_segments self.to_dyn_1 = dyn_a self.to_dyn_2 = dyn_b
def __init__(self, input_1, input_2, perm_1, perm_2): super(Transpose_dynamic2, self).__init__() self.transpose = P.Transpose() self.test_dynamic = inner.GpuConvertToDynamicShape() self.x_1 = input_1 self.x_2 = input_2 self.perm_1 = perm_1 self.perm_2 = perm_2
def __init__(self, nptype): super(Transpose_dynamic, self).__init__() self.transpose = P.Transpose() self.test_dynamic = inner.GpuConvertToDynamicShape() self.x = Parameter( initializer(Tensor(np.arange(1 * 2 * 3 * 4 * 5).reshape(1, 2, 3, 4, 5).astype(nptype)), [1, 2, 3, 4, 5]), name='5D') self.perm = (1, 0, 3, 4, 2)
def __init__(self, axis=0, out_nums=1): super(NetConv2dDynamic, self).__init__() self.dynshape = inner.GpuConvertToDynamicShape() out_channel = 2 kernel_size = 1 self.conv = P.Conv2D(out_channel, kernel_size, mode=1, pad_mode="valid", pad=0, stride=1, dilation=1, group=1)
def __init__(self, num_features, gamma_init, beta_init, mean_init, var_init, use_batch_statistics=None): super(NetFusedBatchNormExDynamic, self).__init__() self.bn = P.FusedBatchNormEx(mode=1, epsilon=0.00001, momentum=0.1) self.moving_mean = Parameter(initializer(mean_init, num_features), name="mean", requires_grad=False) self.moving_variance = Parameter(initializer(var_init, num_features), name="variance", requires_grad=False) self.gamma = Parameter(initializer(gamma_init, num_features), name="gamma", requires_grad=True) self.beta = Parameter(initializer(beta_init, num_features), name="beta", requires_grad=True) self.dynshape = inner.GpuConvertToDynamicShape()
def __init__(self): super(ReduceAllDynamic, self).__init__() self.reduceall = P.ReduceAll(False) self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self): super(TestScatterAddDynamicNet2, self).__init__() self.scatter_add = P.ScatterAdd() self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self): super(Tensoradd_d, self).__init__() self.test_dynamic = inner.GpuConvertToDynamicShape() self.add = P.Add()
def __init__(self): super(NetMul_dynamic, self).__init__() self.mul = P.Mul() self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self): super(DynamicNet, self).__init__() self.HSigmoid = P.HSigmoid() self.d = inner.GpuConvertToDynamicShape()
def __init__(self): super(ReduceMinDynamic, self).__init__() self.reducemin = P.ReduceMin(False) self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self): super(GpuConvertToDynamicShapeNet, self).__init__() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape( )
def __init__(self): super(SqaureNetDynamic, self).__init__() self.square = P.Square() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape()
def __init__(self): super(NetReluDynamic, self).__init__() self.conv = inner.GpuConvertToDynamicShape() self.relu = P.ReLU()
def __init__(self): super(ReduceSumDynamic, self).__init__() self.reducesum = P.ReduceSum(True) self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self): super(SequenceMaskDynamicNet2, self).__init__() self.convert_to_dynamic_shape = inner.GpuConvertToDynamicShape()
def __init__(self, x, axis): super(ReduceAnyDynamic, self).__init__() self.reduceany = P.ReduceAny(False) self.test_dynamic = inner.GpuConvertToDynamicShape() self.x = x self.axis = axis
def __init__(self, transpose_a=False, transpose_b=False): super(BatchMatMul_d, self).__init__() self.batch_matmul = P.BatchMatMul(transpose_a, transpose_b) self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self, inputx): super(TestScatterUpdateDynamicNet2, self).__init__() self.scatter_update = P.ScatterUpdate() self.test_dynamic = inner.GpuConvertToDynamicShape() self.inputx = Parameter(inputx, name="inputx")
def __init__(self): super(NetDynamic, self).__init__() self.conv = inner.GpuConvertToDynamicShape() self.expand_dims = P.ExpandDims()
def __init__(self): super(ZerosLikeDynamicNet, self).__init__() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape() self.zeros_like = P.ZerosLike()
def __init__(self, axis=0, out_nums=1): super(NetDynamic, self).__init__() self.conv = inner.GpuConvertToDynamicShape() self.split = P.Split(axis, out_nums)
def __init__(self, x, axis, keepdims=False): super(ReduceMeanDynamic, self).__init__() self.test_dynamic = inner.GpuConvertToDynamicShape() self.reducemean = P.ReduceMean(keep_dims=keepdims) self.x = x self.axis = axis
def __init__(self, type0, type1): super(NetDynamic, self).__init__() self.conv = inner.GpuConvertToDynamicShape() self.Cast = P.Cast() self.type0 = type0 self.type1 = type1
def __init__(self): super(AssertDynamicShapeNet, self).__init__() self.gpu_convert_to_dynamic_shape = inner.GpuConvertToDynamicShape( ) self.error_on_dynamic_shape_input = inner.ErrorOnDynamicShapeInput( )
def __init__(self): super(NetEqualDynamic, self).__init__() self.conv = inner.GpuConvertToDynamicShape() self.Equal = P.Equal()
def __init__(self): super(BiasAddDynamic, self).__init__() self.ba = P.BiasAdd() self.test_dynamic = inner.GpuConvertToDynamicShape()
def __init__(self, maxlen): super(SequenceMaskDynamicNet, self).__init__() self.maxlen = maxlen self.convert_to_dynamic_shape = inner.GpuConvertToDynamicShape() self.sequence_mask = P.SequenceMask()