Skip to content

Commit ef82af7

Browse files
committed
Fix ImageType test.
1 parent 5f1f598 commit ef82af7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/TensorFlowNET.UnitTest/TF_API/StringsApiTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ public void ImageType()
4343
var contents = tf.io.read_file(imgPath);
4444

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

49-
var result = math_ops.equal(substr, jpg_tensor);
48+
var result = math_ops.equal(substr, jpg);
49+
Assert.IsTrue((bool)result);
5050
}
5151

5252
[TestMethod]

0 commit comments

Comments
 (0)