Upload 2 files
Browse filesFiles changed (2)
- SqueezeNet_int_NHWC.onnxAdded+3
- eval_onnx.py+1-4
123version https://git-lfs.github.com/spec/v1oid sha256:54c81613ca567e51a68ca37f2f728f3b52549f45116a13e3c63c2e0efd82bf12size 500844267 unmodified lines6869707172737416 unmodified lines91929394959697989910010110210340 unmodified lines14414514614714814915067 unmodified linesoutput: Prediction of the model.target: Ground truth labels.topk: Topk accuracy to compute.Returns:Accuracy results according to 'topk'."""16 unmodified linesbatch_size: int = 100,workers: int = 8) -> torch.utils.data.DataLoader:"""Returns a validation data loader of ImageNet by given `data_dir`.Args:data_dir: Directory where images stores. There must be a subdirectory named'validation' that stores the validation set of ImageNet.batch_size: Batch size of data loader.workers: How many subprocesses to use for data loading.Returns:An object of torch.utils.data.DataLoader."""40 unmodified linesval_loader = tqdm(val_loader, file=sys.stdout)with torch.no_grad():for batch_idx, (images, targets) in enumerate(val_loader):inputs, targets = images.numpy(), targetsort_inputs = {ort_session.get_inputs()[0].name: inputs}outputs = ort_session.run(None, ort_inputs)67 unmodified lines68697071727316 unmodified lines9091929394959697989910040 unmodified lines14114214314414514614767 unmodified linesoutput: Prediction of the model.target: Ground truth labels.topk: Topk accuracy to compute.Returns:Accuracy results according to 'topk'."""16 unmodified linesbatch_size: int = 100,workers: int = 8) -> torch.utils.data.DataLoader:"""Returns a validation data loader of ImageNet by given `data_dir`.Args:data_dir: Directory where images stores. There must be a subdirectory named'validation' that stores the validation set of ImageNet.batch_size: Batch size of data loader.workers: How many subprocesses to use for data loading.Returns:An object of torch.utils.data.DataLoader."""40 unmodified linesval_loader = tqdm(val_loader, file=sys.stdout)with torch.no_grad():for batch_idx, (images, targets) in enumerate(val_loader):inputs, targets = images.numpy().transpose(0, 2, 3, 1), targetsort_inputs = {ort_session.get_inputs()[0].name: inputs}outputs = ort_session.run(None, ort_inputs)
SqueezeNet_int_NHWC.onnxAdded+3
eval_onnx.py+1-4