Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
57013cc2
Commit
57013cc2
authored
Sep 26, 2017
by
Adam Procter
Committed by
Yixing Lao
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove TensorConstant::set_value method
parent
7e5a5f76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
constant.hpp
src/ngraph/ops/constant.hpp
+0
-2
execute.cpp
test/execute.cpp
+2
-2
No files found.
src/ngraph/ops/constant.hpp
View file @
57013cc2
...
...
@@ -115,8 +115,6 @@ namespace ngraph
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
:
std
::
shared_ptr
<
ngraph
::
runtime
::
ParameterizedTensorView
<
T
>>
m_value
;
};
...
...
test/execute.cpp
View file @
57013cc2
...
...
@@ -273,7 +273,7 @@ TEST(execute, test_tensor_constant)
{
auto
shape
=
Shape
{
2
,
2
,
2
};
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
external
=
make_shared
<
ngraph
::
runtime
::
ExternalFunction
>
(
f
);
...
...
@@ -290,7 +290,7 @@ TEST(execute, test_tensor_constant_with_op)
{
auto
shape
=
Shape
{
2
,
2
,
2
};
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
external
=
make_shared
<
ngraph
::
runtime
::
ExternalFunction
>
(
f
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment