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
226a489f
Commit
226a489f
authored
Nov 02, 2017
by
Adam Procter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move autodiff.cpp to test directory
parent
ca569f0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
CMakeLists.txt
test/CMakeLists.txt
+1
-1
autodiff.cpp
test/autodiff.cpp
+2
-2
all_close.cpp
test/util/all_close.cpp
+2
-4
No files found.
test/CMakeLists.txt
View file @
226a489f
...
...
@@ -22,6 +22,7 @@ include_directories(
)
set
(
SRC
autodiff.cpp
build_graph.cpp
eigen.cpp
execute.cpp
...
...
@@ -36,7 +37,6 @@ set (SRC
topological_sort.cpp
type_prop.cpp
util/all_close.cpp
util/autodiff.cpp
util/test_tools.cpp
util.cpp
uuid.cpp
...
...
test/
util/
autodiff.cpp
→
test/autodiff.cpp
View file @
226a489f
...
...
@@ -19,12 +19,12 @@
#include "gtest/gtest.h"
#include "all_close.hpp"
#include "ngraph/autodiff/backprop_derivative.hpp"
#include "ngraph/autodiff/backprop_function.hpp"
#include "ngraph/autodiff/numeric_derivative.hpp"
#include "ngraph/ngraph.hpp"
#include "random.hpp"
#include "util/all_close.hpp"
#include "util/random.hpp"
using
namespace
std
;
using
namespace
ngraph
;
...
...
test/util/all_close.cpp
View file @
226a489f
...
...
@@ -90,16 +90,14 @@ template <typename T>
bool
ngraph
::
test
::
all_close
(
const
std
::
vector
<
T
>&
a
,
const
std
::
vector
<
T
>&
b
,
T
rtol
,
T
atol
)
{
assert
(
a
.
size
()
==
b
.
size
());
bool
retval
=
true
;
for
(
size_t
i
=
0
;
i
<
a
.
size
();
++
i
)
{
if
(
std
::
abs
(
a
[
i
]
-
b
[
i
])
>
atol
+
rtol
*
std
::
abs
(
b
[
i
]))
{
std
::
cout
<<
"a["
<<
i
<<
"] = "
<<
a
[
i
]
<<
", b["
<<
i
<<
"] = "
<<
b
[
i
]
<<
std
::
endl
;
retval
=
false
;
return
false
;
}
}
return
retval
;
return
true
;
}
template
bool
ngraph
::
test
::
all_close
<
float
>
(
const
std
::
vector
<
float
>&
a
,
...
...
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