-
Notifications
You must be signed in to change notification settings - Fork 11
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
"topk" documentation #147
Comments
Hello Dan, in terms of this variable, I wrote it based on our source code switch (this.modelName) {
case "mobilenet":
this.modelToUse = mobilenet;
const config = handleOptions(
options,
{
version: {
type: "enum",
enums: [1, 2],
default: 2,
},
alpha: {
type: "enum",
enums: (config) =>
config.version === 1
? [0.25, 0.5, 0.75, 1.0]
: [0.5, 0.75, 1.0],
default: 1.0,
},
topk: {
type: "number",
integer: true,
default: 3,
},
},
"imageClassifier"
);
this.version = config.version;
this.alpha = config.alpha;
this.topk = config.topk;
break;
case "darknet":
this.version = "reference"; // this a 28mb model
this.modelToUse = darknet;
break;
case "darknet-tiny":
this.version = "tiny"; // this a 4mb model
this.modelToUse = darknet;
break;
case "doodlenet":
this.modelToUse = doodlenet;
break;
default:
this.modelToUse = null;
}
} My understanding is that classify(img, topk = 10) {
...
} I think this is why in Jack's problem the But either way! I will update the docs to reflect how we decide to implement it :) |
Just to clarify, passing |
Ah, I see, I wasn't looking closely at this. I agree, we should focus on the user specifying the number of classes they want to see returned right in the |
This has now been implemented in the code (ml5js/ml5-next-gen#179) and we can finalize the documentation, here are some possible next steps:
|
Opening a discussion for
topk
related to ml5js/ml5-next-gen#166.topk
) and/or a glossary entry?The text was updated successfully, but these errors were encountered: