Skip to content
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

Add :spec_overrides to Bumblebee.load_model/2 #340

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

jonatanklosko
Copy link
Member

{:ok, spec} = Bumblebee.load_spec({:hf, "microsoft/resnet-50"})
spec = Bumblebee.configure(spec, num_labels: 10)
{:ok, resnet} = Bumblebee.load_model({:hf, "microsoft/resnet-50"}, spec: spec)

->

{:ok, resnet} =
  Bumblebee.load_model({:hf, "microsoft/resnet-50"}, spec_overrides: [num_labels: 10])

I considered accepting a keyword list for :spec, but probably better to kept them separate for clarity.

@jonatanklosko jonatanklosko merged commit beca321 into main Feb 21, 2024
2 checks passed
@jonatanklosko jonatanklosko deleted the jk-spec-overrides branch February 21, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants