Download data/benchmark.py from amd/PAN: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/amd/PAN/resolve/main/data/benchmark.py
- Command line
-
hf download hf://amd/PAN/data/benchmark.py
-
curl -L -o benchmark.py https://huggingface.co/amd/PAN/resolve/main/data/benchmark.py
653 Bytes
| import os | |
| from data import srdata | |
| class Benchmark(srdata.SRData): | |
| def __init__(self, args, name='', benchmark=True, input_data_format ='NHWC'): | |
| super(Benchmark, self).__init__( | |
| args, name=name, benchmark=True, input_data_format=input_data_format | |
| ) | |
| def _set_filesystem(self, dir_data): | |
| self.apath = os.path.join(dir_data, 'benchmark', self.name) | |
| self.dir_hr = os.path.join(self.apath, 'HR') | |
| if self.input_large: | |
| self.dir_lr = os.path.join(self.apath, 'LR_bicubicL') | |
| else: | |
| self.dir_lr = os.path.join(self.apath, 'LR_bicubic') | |
| self.ext = ('', '.png') | |