-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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
[Bert] Feature: Custom Model Outputs #1
Conversation
75e57fc
to
74930eb
Compare
a860d95
to
5d3c24a
Compare
1c5977f
to
06b188b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small change. I think it's a good idea to have all initialization related attributes in the model config, but thanks a lot for the contribution!
bert-burn/src/model.rs
Outdated
} | ||
|
||
impl BertModelConfig { | ||
/// Initializes a Bert model with default weights | ||
pub fn init<B: Backend>(&self, device: &B::Device) -> BertModel<B> { | ||
let embeddings = BertEmbeddingsConfig { | ||
pub fn init<B: Backend>(&self, device: &B::Device, with_pooling_layer: bool) -> BertModel<B> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would put the pooling_layer
in the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I went back and forth on it, and I ended up going in this direction because I reasoned that this was a Burn-specific modifier rather than an actual model config parameter. I can see how it's more obvious in the config, though, so that distinction doesn't really matter. 😄 I'll make the change, and stage the PR against the tracel-ai repo for final review. Thanks for taking a look!
55315ba
to
605f98b
Compare
Closing this PR in favor of one targeting the upstream repo: tracel-ai#31 |
No description provided.