Insert and train an additional layer between trained lstm layers and output layers

78 views Asked by At

Here is what I wanna do:

I want to use some transfer learning techniques to deal with sequence problems: First use dataset_1 to train a lstm model, Second insert another lstm layer before the output layer, and then use dataset_2 to only train the newly adding layer, and the variables of other layers are imported from the first training stage and remain unchanged

here's the problem, the existing methods all require the variable name of weight/bias when restoring the pre-trained model. And I want to use the fuction tf.contrib.rnn.MultiRNNCell(*) in my code.However, the function is a black box and unable to obtain concrete variable names. How can I realize the idea?

0

There are 0 answers