DL-text icon indicating copy to clipboard operation
DL-text copied to clipboard

Use of train=false in dl.py

Open akshitac8 opened this issue 7 years ago • 3 comments

Can you elaborate the use of parameter train=false passed to word2vec_embedding_layer( ) as default parameter. You have already used pre-trained embedding, so what happens when we use train=true?

akshitac8 avatar Apr 01 '18 10:04 akshitac8

Having set train to False means the value of each word vector (coming from a pretrained embedding matrix) will remain unchanged at every epoch, otherwise they change at each backpropagation. The train value is ignored (It is always True) if you learn the matrix of vectors from the scratch.

sachka avatar Apr 04 '18 09:04 sachka

@sachka is right. When you set the train value as false, the number of trainable parameters are reduced. This could help to converge quickly.

1

GauravBh1010tt avatar Apr 04 '18 12:04 GauravBh1010tt

@akshitac8 @GauravBh1010tt If the description is satisfactory then can we close this one? 🎏

adityac8 avatar Apr 07 '18 23:04 adityac8