/third_party/mindspore/tests/ut/python/ir/ |
D | test_sparse_tensor.py | 39 def __init__(self, dense_shape): argument 41 self.dense_shape = dense_shape 43 ret = (SparseTensor(indices, values, self.dense_shape),) 57 self.dense_shape = (3, 4) 59 x = SparseTensor(indices, values, self.dense_shape) 60 return x.values, x.indices, x.dense_shape 71 dense_shape = (2, 2) 73 MakeSparseTensor(dense_shape)(indices, values) 79 dense_shape = (2, 2, 2) 81 MakeSparseTensor(dense_shape)(indices, values) [all …]
|
D | test_row_tensor.py | 241 self.dense_shape = (3, 2) 243 ret = (RowTensor(indices, values, self.dense_shape),) 251 def __init__(self, dense_shape): argument 253 self.dense_shape = dense_shape 255 x = RowTensor(indices, values, self.dense_shape) 256 return x.values, x.indices, x.dense_shape 273 return grad[0].indices, grad[0].values, grad[0].dense_shape 297 return x.values, x.indices, x.dense_shape 368 dense_shape = (3, 4) 370 RowTensorGetAttr(dense_shape)(indices, values) [all …]
|
/third_party/mindspore/tests/ut/python/pynative_mode/ |
D | test_graph_param_cases.py | 85 dense_shape = x.dense_shape 86 return RowTensor(indices, values, dense_shape) 95 dense_shape = x.dense_shape 96 return RowTensor(indices, values, dense_shape) 99 def __init__(self, dense_shape): argument 103 self.dense_shape = dense_shape 107 x = RowTensor(indices, values, self.dense_shape) 112 return x.indices, x.values, x.dense_shape 117 dense_shape = (5, 2) 119 net = RowTensorWithControlWhile(dense_shape)
|
D | test_sparse_pynative.py | 46 def __init__(self, dense_shape): argument 48 self.dense_shape = dense_shape 50 x = RowTensor(indices, values, self.dense_shape) 51 return x.values, x.indices, x.dense_shape 62 self.dense_shape = (3, 4) 64 x = SparseTensor(indices, values, self.dense_shape) 65 return x.values, x.indices, x.dense_shape
|
/third_party/mindspore/tests/st/pynative/ |
D | test_graph_param_transform.py | 85 dense_shape = x.dense_shape 86 return RowTensor(indices, values, dense_shape) 93 dense_shape = x.dense_shape 94 return RowTensor(indices, values, dense_shape) 97 def __init__(self, dense_shape): argument 101 self.dense_shape = dense_shape 105 x = RowTensor(indices, values, self.dense_shape) 110 return x.indices, x.values, x.dense_shape 115 dense_shape = (5, 2) 116 net = RowTensorWithControlWhile(dense_shape) [all …]
|
/third_party/mindspore/tests/st/ops/cpu/ |
D | test_sparse_tensor_dense_matmul_op.py | 58 dense_shape = (3, 4) 66 out_ms = sparse_dense_matmul_net(indices, values, dense_shape, dense) 71 grad_ms = grad_net(indices, values, dense_shape, dense) 87 dense_shape = (4, 3) 95 out_ms = sparse_dense_matmul_net(indices, values, dense_shape, dense) 101 grad_ms = grad_net(indices, values, dense_shape, dense) 117 dense_shape = (4, 3) 125 out_ms = sparse_dense_matmul_net(indices, values, dense_shape, dense) 131 grad_ms = grad_net(indices, values, dense_shape, dense) 147 dense_shape = (3, 4) [all …]
|
/third_party/mindspore/mindspore/ops/_grad/ |
D | grad_sparse.py | 27 def bprop_make_sparse_tensor(indices, values, dense_shape, out, dout): argument 56 def bprop(indices, values, dense_shape, out, dout): argument 57 return zeros_like(indices), F.gather_nd(dout, indices), zeros_like(dense_shape) 69 def bprop(indices, values, dense_shape, dense, out, dout): argument 70 dense_grad = sparse_tensor_dense_mat_mul(indices, values, dense_shape, dout) 79 return zeros_like(indices), values_grad, zeros_like(dense_shape), dense_grad
|
D | grad_comm_ops.py | 64 dx = RowTensor(indices, grad, dout.dense_shape) 80 dx = RowTensor(indices, grad, dout.dense_shape) 430 dx = RowTensor(indices, grad, dout.dense_shape) 437 dx = RowTensor(indices, grad, dout.dense_shape)
|
D | grad_array_ops.py | 113 return RowTensor(dout.indices, values, dout.dense_shape)
|
/third_party/mindspore/mindspore/core/abstract/ |
D | prim_others.cc | 210 auto dense_shape = CheckArg<AbstractTuple>(op_name, args_spec_list, 2); in InferImplMakeRowTensor() local 227 for (const auto &elem_type : dense_shape->ElementsType()) { in InferImplMakeRowTensor() 232 auto dense_shape_value = dense_shape->BuildValue(); in InferImplMakeRowTensor() 261 ret->set_dense_shape(dense_shape); in InferImplMakeRowTensor() 291 MS_EXCEPTION_IF_NULL(row_tensor->dense_shape()); in InferImplRowTensorGetDenseShape() 292 return row_tensor->dense_shape(); in InferImplRowTensorGetDenseShape() 303 MS_EXCEPTION_IF_NULL(row_tensor->dense_shape()); in InferImplRowTensorAdd() 316 auto dense_shape = CheckArg<AbstractTuple>(op_name, args_spec_list, 2); in InferImplMakeSparseTensor() local 337 for (const auto &elem_type : dense_shape->ElementsType()) { in InferImplMakeSparseTensor() 342 auto dense_shape_value = dense_shape->BuildValue()->cast<ValueTuplePtr>(); in InferImplMakeSparseTensor() [all …]
|
D | abstract_value.h | 716 const AbstractTuplePtr dense_shape() const { return dense_shape_; } in dense_shape() function 717 void set_dense_shape(const AbstractTuplePtr &dense_shape) { dense_shape_ = dense_shape; } in set_dense_shape() argument 745 const AbstractTuplePtr dense_shape() const { return dense_shape_; } in dense_shape() function 746 void set_dense_shape(const AbstractTuplePtr &dense_shape) { dense_shape_ = dense_shape; } in set_dense_shape() argument
|
/third_party/mindspore/mindspore/core/ops/ |
D | sparse_to_dense.cc | 37 …auto dense_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[kInputIndex3]->Build… in SparseToDenseInfer() local 40 return std::make_shared<abstract::AbstractTensor>(values_type, dense_shape); in SparseToDenseInfer()
|
/third_party/mindspore/mindspore/nn/wrap/ |
D | grad_reducer.py | 179 grad = RowTensor(indices, dout, grad.dense_shape) 209 grad = RowTensor(indices, dout, grad.dense_shape) 275 return RowTensor(grad.indices, dout, grad.dense_shape)
|
D | loss_scale.py | 41 grad.dense_shape)
|
/third_party/mindspore/mindspore/nn/sparse/ |
D | sparse.py | 67 sparse_tensor.dense_shape)
|
/third_party/mindspore/mindspore/nn/optim/ |
D | optimizer.py | 668 shape = gradient.dense_shape 686 shape = gradient.dense_shape 735 …return RowTensor(grad.indices, grad.values * F.cast(scale, F.dtype(grad.values)), grad.dense_shape) 747 return RowTensor(unique_indices, summed_values, grad.dense_shape)
|
/third_party/mindspore/mindspore/common/ |
D | tensor.py | 1944 def __init__(self, indices, values, dense_shape): argument 1948 self.__dense_shape = dense_shape 1959 def dense_shape(self): member in RowTensor 2010 def __init__(self, indices, values, dense_shape): argument 2014 self.__dense_shape = dense_shape 2025 def dense_shape(self): member in SparseTensor
|
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ |
D | clean.cc | 84 …ractBasePtr> abstract_list{abs_sparse->indices(), abs_sparse->values(), abs_sparse->dense_shape()}; in AdaptAbs() 91 abs_row_tensor->dense_shape()}; in AdaptAbs()
|
/third_party/mindspore/mindspore/boost/ |
D | boost_cell_wrapper.py | 67 grad.dense_shape)
|