-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inference and loading pretrained model problems #9
Comments
Thank you for your interest in our publication.
There are two ways to load pre-trained weights for our model:
prlab.cli is an entry point, you can easily write a py-script yourself by following the step by step of processing pipeline we defined in the JSON configure. It defines the data and process to load data, network, do the training and predict, and report. Below are steps to make py code yourself:
E.g., from config/raf-db.json we can make a py script to run like that, (one fold):
In each step, e.g. in # 5 (process_pipeline_5), if you want to be more controllable for create_obj_model(...), you could follow the implement to see the params in the conf variable are using. |
Thanks for the explanations about prlab.cli since i haven't met before such library and haven't worked with that either. But first time for everything =) About full pretrained model - it will be really great to get this model. Could you upload it? |
Hello.
Thanks for your code. I've wanted to make py-script to infer your model instead of prlab.cli launches you've provided. So, I've simply wanted to load pre-trained weights to the model. If i got it right, I'm need to use model
PyramidSRShare
, but the model consists of several sub-networks like stn, classifier, pyramid_groups. You've providededsr_baseline_x2-1bc95232.pt
pre-trained file, which i've tried to load like inload_weights
As i understand, this x2 file should be loaded to pyramid_group[1] which was created
pyramid_group.append(self.make_layer_pyramid(mul, input_spec))
using mul = 2. But when i'm trying to load the weights, i'm getting "Unexpected keys" and "Missing keys" error. So, probably, i'\m doing something wrong.Moreover, even if I'll be able to load properly weights to pyramid_group[1] there are still stn, classifier and other pyramid_group[0,2] which won't be initialized with pretrained weights. So, should there be some other pre-trained weights too?
The text was updated successfully, but these errors were encountered: