CRNN-Keras icon indicating copy to clipboard operation
CRNN-Keras copied to clipboard

K.set_learning_phase(0)

Open soldierofhell opened this issue 6 years ago • 2 comments

Hi,

I don't get it why in training.py there's a line 7, which forces the learning_phase to 0 (=test)? K.set_learning_phase(0)

As far as I know for example BatchNormalization() layer behaves differently in 0 and 1 phase.

soldierofhell avatar Dec 03 '18 10:12 soldierofhell

In fact, I did not really understand K.set_learning_phase (0).

Since there was too much performance difference according to 0 or 1, I fixed it to 0 and did training and inference.

If anyone knows exactly what K.set_learning_phase () is, please let me know.

qjadud1994 avatar Dec 04 '18 02:12 qjadud1994

K.set_learning_phase (), in the older version of keras, because of BN layers, we must specify the training and inference mode, but in the new version of keras this bug is fixed and don't necessary to set this option.

DeeeepNet avatar May 04 '19 12:05 DeeeepNet