|
|
|
@@ -33,20 +33,23 @@ namespace TensorFlowNET.UnitTest |
|
|
|
Assert.AreEqual(0, feed.NumControlOutputs); |
|
|
|
|
|
|
|
AttrValue attr_value = null; |
|
|
|
c_test_util.GetAttrValue(feed, "dtype", ref attr_value, s); |
|
|
|
Assert.IsTrue(c_test_util.GetAttrValue(feed, "dtype", ref attr_value, s)); |
|
|
|
Assert.AreEqual(attr_value.Type, DataType.DtInt32); |
|
|
|
|
|
|
|
// Test not found errors in TF_Operation*() query functions. |
|
|
|
// Assert.AreEqual(-1, c_api.TF_OperationOutputListLength(feed, "bogus", s)); |
|
|
|
// Assert.AreEqual(TF_Code.TF_INVALID_ARGUMENT, s.Code); |
|
|
|
// Assert.IsFalse(c_test_util.GetAttrValue(feed, "missing", ref attr_value, s)); |
|
|
|
// Assert.AreEqual("Operation 'feed' has no attr named 'missing'.", s.Message); |
|
|
|
Assert.AreEqual(-1, c_api.TF_OperationOutputListLength(feed, "bogus", s)); |
|
|
|
Assert.AreEqual(TF_Code.TF_INVALID_ARGUMENT, s.Code); |
|
|
|
//Assert.IsFalse(c_test_util.GetAttrValue(feed, "missing", ref attr_value, s)); |
|
|
|
//Assert.AreEqual("Operation '' has no attr named 'missing'.", s.Message); |
|
|
|
|
|
|
|
// Make a constant oper with the scalar "3". |
|
|
|
var three = c_test_util.ScalarConst(3, graph, s); |
|
|
|
|
|
|
|
// Add oper. |
|
|
|
var add = c_test_util.Add(feed, three, graph, s); |
|
|
|
|
|
|
|
NodeDef node_def = null; |
|
|
|
c_test_util.GetNodeDef(feed, ref node_def); |
|
|
|
} |
|
|
|
} |
|
|
|
} |