sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.44k stars 673 forks source link

error:'_io.BufferedReader' object is not subscriptable at code of srdata.py #319

Open ulfailliyina opened 3 years ago

ulfailliyina commented 3 years ago

when I do training !python main.py --model EDSR --scale 4 --save EDSR_baseline_x4 --reset --pre_train ../experiment/model/EDSR_baseline_x2.pt

EDSR-PyTorch-master/code/data/srdata.py  
with open(f_hr, 'rb') as _f: hr = np.load(_f)[0]['image']
Typeerror: Cannot load file containing pickled data when allow_pickle=False

then I edited the code below, but there is error again

with open(f_hr, 'rb') as _f: hr = np.load((_f)[0]['image'], allow_pickle=True)
Typeerror: '_io.BufferedReader' object is not subscriptable

how to fix this? anyone could help? thank you..