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

feature extractor model loading relative path? #238

Open
shiffman opened this issue Nov 9, 2018 · 5 comments
Open

feature extractor model loading relative path? #238

shiffman opened this issue Nov 9, 2018 · 5 comments
Labels
API For function naming and other API questions. feature request feature-extractor

Comments

@shiffman
Copy link
Member

shiffman commented Nov 9, 2018

If the sketch is not at the root path, I can load the model at the current directory as follows:

  classifier.load('./model.json', customModelReady);

However, if I ask for model.json this way:

  classifier.load('model.json', customModelReady);

It then looks in the root directory for model.weights.bin. This is minor for my example, but noting as it's an error people will encounter?

@RobbertC5
Copy link

This behavior is in accordance with the standard behavior of html and javascript. When loading javascript, css, images ... not specifying a folder will point the browser to the root of the host.

@shiffman
Copy link
Member Author

shiffman commented Nov 9, 2018

Ah, ok, yes, I think it's a-ok to stay with convention! Maybe we can console log a custom error message instead of:

screen shot 2018-11-09 at 6 46 02 pm

@shiffman
Copy link
Member Author

I think we can leave this as is for now and revisit later if it comes up as a point of confusion for people.

@RobbertC5
Copy link

I'm sorry, upon revisiting, I think my comment above is wrong.
Not specifying a path should in fact point to the current folder. / points to the root.

If I'm correct this time, you can indeed call this a bug (that should be fixed).

@shiffman shiffman reopened this Jan 25, 2019
@shiffman
Copy link
Member Author

Ok, re-opening!

@joeyklee joeyklee added enhancement API For function naming and other API questions. labels Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API For function naming and other API questions. feature request feature-extractor
Projects
None yet
Development

No branches or pull requests

4 participants