FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/test/TensorFlowNET.UnitTest/CApiTest.cs at master · rajeevyadav/TensorFlow.NET · GitHub
rajeevyadav
/
TensorFlow.NET
Public
forked from
SciSharp/TensorFlow.NET
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TensorFlow.NET
/
test
/
TensorFlowNET.UnitTest
/
CApiTest.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (54 loc) · 1.83 KB
Breadcrumbs
TensorFlow.NET
/
test
/
TensorFlowNET.UnitTest
/
CApiTest.cs
Copy path
File metadata and controls
66 lines (54 loc) · 1.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using
Microsoft
.
VisualStudio
.
TestTools
.
UnitTesting
;
using
Tensorflow
;
namespace
TensorFlowNET
.
UnitTest
{
public
class
CApiTest
{
protected
TF_Code
TF_OK
=
TF_Code
.
TF_OK
;
protected
TF_DataType
TF_FLOAT
=
TF_DataType
.
TF_FLOAT
;
protected
void
EXPECT_TRUE
(
bool
expected
)
{
Assert
.
IsTrue
(
expected
)
;
}
protected
void
EXPECT_EQ
(
object
expected
,
object
actual
)
{
Assert
.
AreEqual
(
expected
,
actual
)
;
}
protected
void
ASSERT_EQ
(
object
expected
,
object
actual
)
{
Assert
.
AreEqual
(
expected
,
actual
)
;
}
protected
void
ASSERT_TRUE
(
bool
condition
)
{
Assert
.
IsTrue
(
condition
)
;
}
protected
OperationDescription
TF_NewOperation
(
Graph
graph
,
string
opType
,
string
opName
)
{
return
c_api
.
TF_NewOperation
(
graph
,
opType
,
opName
)
;
}
protected
void
TF_AddInput
(
OperationDescription
desc
,
TF_Output
input
)
{
c_api
.
TF_AddInput
(
desc
,
input
)
;
}
protected
Operation
TF_FinishOperation
(
OperationDescription
desc
,
Status
s
)
{
return
c_api
.
TF_FinishOperation
(
desc
,
s
)
;
}
protected
void
TF_SetAttrTensor
(
OperationDescription
desc
,
string
attrName
,
Tensor
value
,
Status
s
)
{
c_api
.
TF_SetAttrTensor
(
desc
,
attrName
,
value
,
s
)
;
}
protected
void
TF_SetAttrType
(
OperationDescription
desc
,
string
attrName
,
TF_DataType
dtype
)
{
c_api
.
TF_SetAttrType
(
desc
,
attrName
,
dtype
)
;
}
protected
void
TF_SetAttrBool
(
OperationDescription
desc
,
string
attrName
,
bool
value
)
{
c_api
.
TF_SetAttrBool
(
desc
,
attrName
,
value
)
;
}
protected
TF_Code
TF_GetCode
(
Status
s
)
{
return
s
.
Code
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL