josarajar / HTRTF

This repository provides a framework implemented in TensorFlow which performs OCR tasks.
8 stars 4 forks source link

Transfer learning #5

Open sanakhamekhem opened 5 years ago

sanakhamekhem commented 5 years ago

Hello Sir,

I would like to ask about the transfer learning task. If I would exlude the first con layer, so, the modified var is this: train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='Layer_Linear') + tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='BLSTM[12]') + tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='conv[12345]')

train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='Layer_Linear') + tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='BLSTM[12]') + tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope='conv[2345]')

or I would modify the transfered one??? Thank you in advance.

josarajar commented 4 years ago

Hello,

If you want to freeze the parameters from the first conv layer, the modification you have write is enough. The transferred one is to set what layers would you like to initialise.

Sorry for the delay.