Open
Description
In tf_utils.py HW1, I found dropout implementation as follows,
def dropout(x, pkeep, phase=None, mask=None):
mask = tf.floor(pkeep + tf.random_uniform(tf.shape(x))) if mask is None else mask
if phase is None:
return mask * x
else:
return switch(phase, mask*x, pkeep*x)
In test phase, should it be x/pkeep instead of x*pkeep(based on inverse dropout theory)? If not, why?
Thanks for your explanation.
Metadata
Metadata
Assignees
Labels
No labels