shamangary/SSR-Net

Training error

noelcodes opened this issue · 1 comments

I have some problems to start training. See 2 errors below.

Error 1: it is looking for a pre-trained weights but not available from repo
cmd:> python SSRNET_train.py --input ../data/imdb_db.npz --db imdb--netType1 1 --netType2 1

OSError: Unable to open file (Unable to open file: name = 'imdb_models/ssrnet_3_3_3_64_0.25_0.25/ssrnet_3_3_3_64_0.25_0.25.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

Error 2: I solve error1 by replace the imdb_models with from another pre-train folder, I hv picked "ssrnet_3_3_3_64_1.0_1.0", it throws me another error below:

UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in position 838-839: truncated \uXXXX

Details:

Total params: 40,915
Trainable params: 40,531
Non-trainable params: 384


DEBUG:root:Saving model...
Traceback (most recent call last):
File "SSRNET_train.py", line 136, in
main()
File "SSRNET_train.py", line 95, in main
f.write(model.to_json())
File "C:\Users\default.LAPTOP-2CI68M4P\Anaconda3\envs\xrvision2\lib\site-packages\keras\engine\topology.py", line 2618, in to_json
model_config = self._updated_config()
File "C:\Users\default.LAPTOP-2CI68M4P\Anaconda3\envs\xrvision2\lib\site-packages\keras\engine\topology.py", line 2585, in _updated_config
config = self.get_config()
File "C:\Users\default.LAPTOP-2CI68M4P\Anaconda3\envs\xrvision2\lib\site-packages\keras\engine\topology.py", line 2322, in get_config
layer_config = layer.get_config()
File "C:\Users\default.LAPTOP-2CI68M4P\Anaconda3\envs\xrvision2\lib\site-packages\keras\layers\core.py", line 656, in get_config
function = func_dump(self.function)
File "C:\Users\default.LAPTOP-2CI68M4P\Anaconda3\envs\xrvision2\lib\site-packages\keras\utils\generic_utils.py", line 175, in func_dump
code = marshal.dumps(func.code).decode('raw_unicode_escape')
UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in position 838-839: truncated \uXXXX

I don't understand why do you need to load "imdb_models/ssrnet_3_3_3_64_0.25_0.25/ssrnet_3_3_3_64_0.25_0.25.h5" when you are training IMDB.

I train IMDB model from scratch, and take the trained model as the input of WIKI training.

    if db_name == "wiki":
        weight_file = "imdb_models/"+save_name+"/"+save_name+".h5"
        model.load_weights(weight_file)
    elif db_name == "morph": 
        weight_file = "wiki_models/"+save_name+"/"+save_name+".h5"
        model.load_weights(weight_file) 

Please read the paper or the readme file before you alter the code.

The following lines make no sense. I don't understand why you need to pick a pre-trained model for IMDB training.

Error 2: I solve error1 by replace the imdb_models with from another pre-train folder, I hv picked "ssrnet_3_3_3_64_1.0_1.0", it throws me another error below: