Tensorflow_mLSTM icon indicating copy to clipboard operation
Tensorflow_mLSTM copied to clipboard

Loading model from numpy weights

Open athon-millane opened this issue 7 years ago • 1 comments

Hi @jonnykira, thanks very much for sharing this!

I saw the extract_weights.py script you just added and was wondering if it would be possible to add a script to do the opposite - i.e. load in a saved model from the 15 numpy files for further training, as I'm hoping to transfer learn on the openAI model.

Cheers 😊

Edit: I'm currently doing this myself, so I'll submit a PR in case anyone wants to do something similar. In the process, I think I've found a typo at: https://github.com/jonnykira/Tensorflow_mLSTM/blob/master/extract_weights.py#L128 meaning to save gmh instead of gmx a second time.

athon-millane avatar Nov 02 '17 07:11 athon-millane

hello @athon-millane !

Thank you for pointing out this typo! and yes it should be relatively straight forward to initialize the variables in the training script with the pre-trained numpy arrays for transfer learning.

Thanks

jonny-d avatar Nov 06 '17 19:11 jonny-d