def __init__(self, lock, inputx, indices, updates): super(TestScatterMaxNet, self).__init__() self.scatter_max = P.ScatterMax(use_locking=lock) self.inputx = Parameter(inputx, name="inputx") self.indices = Parameter(indices, name="indices") self.updates = Parameter(updates, name="updates")
def __init__(self, input_x): super(ScatterMaxNet, self).__init__() self.input_x = Parameter(input_x, name="para") self.scatter_max = P.ScatterMax()
def __init__(self): super(ScatterMax, self).__init__() self.scatter_max = P.ScatterMax() self.ref = Parameter(Tensor( np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], np.float32)), name="ref")