Browse Source

Fix ImageType test.

tags/v0.20
Oceania2018 5 years ago
parent
commit
ef82af70e8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      test/TensorFlowNET.UnitTest/TF_API/StringsApiTest.cs

+ 3
- 3
test/TensorFlowNET.UnitTest/TF_API/StringsApiTest.cs View File

@@ -43,10 +43,10 @@ namespace TensorFlowNET.UnitTest.TF_API
var contents = tf.io.read_file(imgPath);

var substr = tf.strings.substr(contents, 0, 3);
var jpg = Encoding.UTF8.GetString(new byte[] { 0xff, 0xd8, 0xff });
var jpg_tensor = tf.constant(jpg);
var jpg = tf.constant(new byte[] { 0xff, 0xd8, 0xff }, tf.@string);

var result = math_ops.equal(substr, jpg_tensor);
var result = math_ops.equal(substr, jpg);
Assert.IsTrue((bool)result);
}

[TestMethod]


Loading…
Cancel
Save