We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if pooling == 'first-last-avg': outputs = [ keras.layers.GlobalAveragePooling1D()(outputs[0]), keras.layers.GlobalAveragePooling1D()(outputs[-1]) ] output = keras.layers.Average()(outputs) elif pooling == 'last-avg': output = keras.layers.GlobalAveragePooling1D()(outputs[-1]) elif pooling == 'cls': output = keras.layers.Lambda(lambda x: x[:, 0])(outputs[-1]) elif pooling == 'pooler': output = bert.output
平时不用keras, 但是查了一下GlobalAveragePooling1D是有mask入参的,这个不加attention_mask进来不是会有问题吗? https://keras.io/api/layers/pooling_layers/global_average_pooling1d/
The text was updated successfully, but these errors were encountered:
自带有mask
Sorry, something went wrong.
No branches or pull requests
if pooling == 'first-last-avg':
outputs = [
keras.layers.GlobalAveragePooling1D()(outputs[0]),
keras.layers.GlobalAveragePooling1D()(outputs[-1])
]
output = keras.layers.Average()(outputs)
elif pooling == 'last-avg':
output = keras.layers.GlobalAveragePooling1D()(outputs[-1])
elif pooling == 'cls':
output = keras.layers.Lambda(lambda x: x[:, 0])(outputs[-1])
elif pooling == 'pooler':
output = bert.output
平时不用keras, 但是查了一下GlobalAveragePooling1D是有mask入参的,这个不加attention_mask进来不是会有问题吗?
https://keras.io/api/layers/pooling_layers/global_average_pooling1d/
The text was updated successfully, but these errors were encountered: