bert icon indicating copy to clipboard operation
bert copied to clipboard

linear projection "bias=True" != original t2t implementation transformer

Open gaceladri opened this issue 8 years ago • 1 comments

Hi,

In modeling.py line 866:

with tf.variable_scope("output"): attention_output = tf.layers.dense( attention_output, hidden_size, kernel_initializer=create_initializer(initializer_range))

You are setting the bias of the dense layer = True, where in the original implementation of transformer they are setting it to False. There is any reason for doing that?

Thanks.

gaceladri avatar Nov 03 '18 19:11 gaceladri

No particular reason, we didn't attempt to make it 100% compatible with the original implementation and minor changes like this probably aren't important.

jacobdevlin-google avatar Nov 03 '18 20:11 jacobdevlin-google