Problem while loading
I am trying to load the pretrained model vgg19 using command model = np.load('vgg19.npy') and getting the following error: 694 # The array contained Python objects. We need to unpickle the data. 695 if not allow_pickle: --> 696 raise ValueError("Object arrays cannot be loaded when " 697 "allow_pickle=False") 698 if pickle_kwargs is None:
ValueError: Object arrays cannot be loaded when allow_pickle=False
Basically, I am trying to test valid_LR images directly using the pretrained model.
no model = np.load('vgg19.npy') in the latest code, could you try to update the code ?
could you suggest how to use vgg19 model directly?
this line https://github.com/tensorlayer/srgan/blob/master/train.py#L76
VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static')
help you automatically download and load the model
Change the code from:
model = np.load('vgg19.npy')
to:
model = np.load('vgg19.npy', allow_pickle=True)
At least that worked for me :)
this line https://github.com/tensorlayer/srgan/blob/master/train.py#L76 VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static')
help you automatically download and load the model
Hello,i used VGG = tl.models.vgg19(pretrained=True, end_with='pool4', mode='static') to load Vgg19,but it shows _pickle.UnpicklingError: pickle data was truncated,can you tell me how to deal with it?Thank you.
@Laicheng0830 similar
@yangyingni Check that the data is downloaded completely. vgg19.npy https://github.com/tensorlayer/pretrained-models/tree/master/models
@Laicheng0830 hello, could you tell me how to use vgg19.npy? i also meet the same problem