Skip to content
Snippets Groups Projects
Commit 2d274ce2 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

PosixPath fixes to code snippets

parent b1b44af8
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ First, prepare 2 datasets for autotuning and testing.
```python
from torch2hpvm import BinDataset
from pathlib import Path
from pathlib import Path, PosixPath
data_dir = Path(__file__).parent / "model_params/resnet18_cifar10"
dataset_shape = 5000, 3, 32, 32
......@@ -52,7 +52,7 @@ from torch.nn import Module
import dnn # Defined at `hpvm/test/dnn_benchmarks/pytorch`
model: Module = dnn.ResNet18()
checkpoint = Path(__file__).parent / "model_params/resnet18_cifar10.pth.tar"
checkpoint = Path(__file__).parent.absolute() / PosixPath("../model_params/resnet18_cifar10.pth.tar")
model.load_state_dict(torch.load(checkpoint))
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment