Closed rssdev10 closed 4 years ago
hi, I guess the reason is that I set the dropout default to activate. Run Flux.testmode!(bert_model)
to deactivate the dropout layer then it should always give the same embedding.
Thanks, Flux.testmode!(bert_model)
is really working.
Do you have any thoughts about integrating of BERT embedding into Embeddings.jl ? Or, at least, adding of the mentioned above use case into the documentation/samples or into README.md?
Currently I don't have any idea on how they could fit together, but I think defining a similar API is possible.
With the new Flux AD backend (Zygote), the dropout is default inactive, so there is no need for testmode!
anymore with the newest version.
Hello, I'm trying to use yours BERT implementation for strings vectorizing. But I found that
bert_embedding = sample |> bert_model.embed
generates different vectors per each call. Is it wrong usage from my side?I'm just trying to use it in the manner of this package - https://github.com/JuliaText/Embeddings.jl but with BERT's specific embedding.