MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / load_random_test_case

Function load_random_test_case

samples/python/network_api_pytorch_mnist/sample.py:121–126  ·  view source on GitHub ↗
(model, pagelocked_buffer)

Source from the content-addressed store, hash-verified

119
120# Loads a random test case from pytorch's DataLoader
121def load_random_test_case(model, pagelocked_buffer):
122 # Select an image at random to be the test case.
123 img, expected_output = model.get_random_testcase()
124 # Copy to the pagelocked input buffer
125 np.copyto(pagelocked_buffer, img)
126 return expected_output
127
128
129def main():

Callers 1

mainFunction · 0.85

Calls 1

get_random_testcaseMethod · 0.80

Tested by

no test coverage detected