Commit 57013cc2 authored by Adam Procter's avatar Adam Procter Committed by Yixing Lao

Remove TensorConstant::set_value method

parent 7e5a5f76
...@@ -115,8 +115,6 @@ namespace ngraph ...@@ -115,8 +115,6 @@ namespace ngraph
typename std::shared_ptr<ngraph::runtime::ParameterizedTensorView<T>> get_value() const { return m_value; } typename std::shared_ptr<ngraph::runtime::ParameterizedTensorView<T>> get_value() const { return m_value; }
void set_value(const std::vector<type>& value) const { m_value->get_vector() = value; }
protected: protected:
std::shared_ptr<ngraph::runtime::ParameterizedTensorView<T>> m_value; std::shared_ptr<ngraph::runtime::ParameterizedTensorView<T>> m_value;
}; };
......
...@@ -273,7 +273,7 @@ TEST(execute, test_tensor_constant) ...@@ -273,7 +273,7 @@ TEST(execute, test_tensor_constant)
{ {
auto shape = Shape{2,2,2}; auto shape = Shape{2,2,2};
auto A = make_shared<op::TensorConstant<element::Float32>>(shape); auto A = make_shared<op::TensorConstant<element::Float32>>(shape);
A->set_value(vector<float>{1,2,3,4,5,6,7,8}); A->get_value()->get_vector() = {1,2,3,4,5,6,7,8};
auto f = make_shared<Function>(A, op::Parameters{}); auto f = make_shared<Function>(A, op::Parameters{});
auto external = make_shared<ngraph::runtime::ExternalFunction>(f); auto external = make_shared<ngraph::runtime::ExternalFunction>(f);
...@@ -290,7 +290,7 @@ TEST(execute, test_tensor_constant_with_op) ...@@ -290,7 +290,7 @@ TEST(execute, test_tensor_constant_with_op)
{ {
auto shape = Shape{2,2,2}; auto shape = Shape{2,2,2};
auto A = make_shared<op::TensorConstant<element::Float32>>(shape); auto A = make_shared<op::TensorConstant<element::Float32>>(shape);
A->set_value(vector<float>{-1,2,3,-4,5,-6,-7,8}); A->get_value()->get_vector() = {-1,2,3,-4,5,-6,-7,8};
auto f = make_shared<Function>(make_shared<op::Abs>(A), op::Parameters{}); auto f = make_shared<Function>(make_shared<op::Abs>(A), op::Parameters{});
auto external = make_shared<ngraph::runtime::ExternalFunction>(f); auto external = make_shared<ngraph::runtime::ExternalFunction>(f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment