Home
last modified time | relevance | path

Searched refs:dense_shape (Results 1 – 19 of 19) sorted by relevance

/third_party/mindspore/tests/ut/python/ir/
Dtest_sparse_tensor.py39 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 …]
Dtest_row_tensor.py241 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/
Dtest_graph_param_cases.py85 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)
Dtest_sparse_pynative.py46 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/
Dtest_graph_param_transform.py85 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/
Dtest_sparse_tensor_dense_matmul_op.py58 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/
Dgrad_sparse.py27 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
Dgrad_comm_ops.py64 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)
Dgrad_array_ops.py113 return RowTensor(dout.indices, values, dout.dense_shape)
/third_party/mindspore/mindspore/core/abstract/
Dprim_others.cc210 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 …]
Dabstract_value.h716 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/
Dsparse_to_dense.cc37 …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/
Dgrad_reducer.py179 grad = RowTensor(indices, dout, grad.dense_shape)
209 grad = RowTensor(indices, dout, grad.dense_shape)
275 return RowTensor(grad.indices, dout, grad.dense_shape)
Dloss_scale.py41 grad.dense_shape)
/third_party/mindspore/mindspore/nn/sparse/
Dsparse.py67 sparse_tensor.dense_shape)
/third_party/mindspore/mindspore/nn/optim/
Doptimizer.py668 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/
Dtensor.py1944 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/
Dclean.cc84 …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/
Dboost_cell_wrapper.py67 grad.dense_shape)