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 the WebNN code example #4

Closed
huningxin opened this issue Sep 22, 2020 · 3 comments · Fixed by #11
Closed

Add the WebNN code example #4

huningxin opened this issue Sep 22, 2020 · 3 comments · Fixed by #11
Assignees

Comments

@huningxin
Copy link
Contributor

Add a live example based on the code example in WebNN spec

@huningxin huningxin changed the title Add the basic code example Add the simple code example Sep 22, 2020
@huningxin huningxin changed the title Add the simple code example Add the WebNN code example Sep 22, 2020
@huningxin huningxin self-assigned this Sep 22, 2020
@huningxin
Copy link
Contributor Author

huningxin commented Sep 22, 2020

I am working on something like the following screenshot:

image

It is inspired by the code snippet of tf.js API doc, e.g. tf.add.

The code editor shows the sample code. The users can click the "Run" button to execute the code and see the output in the "console log". The users can click the "Edit" button to modify the code, e.g. change the input value, and run the modified code.

@anssiko @pyu10055 and @wchao1115 any thoughts?

@anssiko
Copy link
Member

anssiko commented Sep 22, 2020

I'm a fan of this feature, and it would surely help lower the threshold for experimentation by web developers. Maybe we should consider adding a feedback mechanism as well in the API docs (e.g. simply add a link to open a new issue in the webnn-polyfill repo) to capture web developer feedback early. I suspect API docs is much more familiar interface to learn about the API than the web spec repo for web developers, and we might capture more such feedback that way. Feel free to open a separate issue to track that proposal.

@huningxin
Copy link
Contributor Author

I'm a fan of this feature, and it would surely help lower the threshold for experimentation by web developers.

Thanks. I'll open a PR for review.

Feel free to open a separate issue to track that proposal.

done. webmachinelearning/webnn-polyfill#21

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 a pull request may close this issue.

2 participants