We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e754a17 commit 3f13408Copy full SHA for 3f13408
test/test.py
@@ -40,9 +40,14 @@ def test_set_tensor(self):
40
41
def test_numpy_tensor(self):
42
con = self.get_client()
43
- con.tensorset('x', np.array([2, 3]))
+ input_array = np.array([2, 3])
44
+ con.tensorset('x', input_array)
45
values = con.tensorget('x').value
46
self.assertEqual([2, 3], values)
47
+ values = con.tensorget('x', as_type=BlobTensor)
48
+ self.assertTrue(np.allclose(input_array, values.to_numpy()))
49
+ ret = con.tensorset('x', values)
50
+ self.assertEqual(ret, b'OK')
51
52
def test_run_tf_model(self):
53
model_path = os.path.join(MODEL_DIR, 'graph.pb')
0 commit comments