Skip to content
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

about argument parse #2

Open
ping1jing2 opened this issue Dec 13, 2017 · 3 comments
Open

about argument parse #2

ping1jing2 opened this issue Dec 13, 2017 · 3 comments

Comments

@ping1jing2
Copy link

Thanks for sharing, but I still have some questions about "matconvnet_hr101_to_pickle.py" to ask you.

First, I can not run it successfully even though I've downloaded "hr_res101.mat" but it still throws "AssertionError: Matlab pretrained model: /path/to/hr_res101.mat not found". I learned about the usage of ArgumentParser, but I did not solve it. If you can give me some help, I would be greatly appreciated.

Second, I do not know much about matlab, so I can not understand the code, such as "clusters = np.copy (net ['meta'] [0] [0] [0] [0] [6])". More precisely, I think "layers = net ['layers']" is correct, but why use "layers = net [' layers'] [0] [0] [0]". Further more, I think "layer_name" and "layer_type" are just a string, but why do you put all the data into layer_inputs and layer_outputs?

Third, what does "weight_file" mean? Can you elaborate on the data you wrote in the weight_file file?

Maybe you think I asked the questions are stupid, yes, I admit, but who have not experienced such a stage? Thanks very much for sharing, and I will be even more grateful if you can help me with these questions.

@greed2411
Copy link

greed2411 commented Mar 31, 2018

I'm way too late. I was stuck over here as well, after tinkering around with different formats, I went to that directory which had both the converter python file and matlab model, and ran this. It worked.

λ python matconvnet_hr101_to_pickle.py --matlab_model_path ./hr_res101.mat --weight_file_path ./hr_res101.pkl

@exnx
Copy link

exnx commented Jul 27, 2018

@greed2411 Thanks for this greed! However, I got an error and thought maybe it's from the way I converted the weight file.

Did you get something like this?

Traceback (most recent call last):
File "tiny_face_eval.py", line 227, in
main()
File "tiny_face_eval.py", line 224, in main
lw=args.line_width, display=args.display)
File "tiny_face_eval.py", line 82, in evaluate
model = tiny_face_model.Model(weight_file_path)
File "/Users/tvision/Desktop/Tiny_Faces_in_Tensorflow/tiny_face_model.py", line 24, in init
self.mat_blocks_dict, self.mat_params_dict = pickle.load(f)
File "/Users/tvision/Desktop/Tiny_Faces_in_Tensorflow/tiny-env/bin/../lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

@Lovely-Mark
Copy link

I got an error about:TypeError: split() got an unexpected keyword argument 'num_or_size_splits',Can you give me some help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants