Skip to content

Commit

Permalink
Comment out testing part
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesnatasya committed May 30, 2020
1 parent 8f7b4ef commit 1f88218
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/onnx/squeezenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ def forward(self, x):
model = Infer(sg_ir)

# verify the test
from utils import load_dataset
inputs, ref_outputs = load_dataset(
os.path.join('/tmp', 'squeezenet1.1', 'test_data_set_0'))
x_batch = tensor.Tensor(device=dev, data=inputs[0])
outputs = model.forward(x_batch)
for ref_o, o in zip(ref_outputs, outputs):
np.testing.assert_almost_equal(ref_o, tensor.to_numpy(o), 4)
# from utils import load_dataset
# inputs, ref_outputs = load_dataset(
# os.path.join('/tmp', 'squeezenet1.1', 'test_data_set_0'))
# x_batch = tensor.Tensor(device=dev, data=inputs[0])
# outputs = model.forward(x_batch)
# for ref_o, o in zip(ref_outputs, outputs):
# np.testing.assert_almost_equal(ref_o, tensor.to_numpy(o), 4)

# inference
logging.info("preprocessing...")
Expand Down

0 comments on commit 1f88218

Please sign in to comment.