在EPUB中嵌入Tensorflow.js吗?

我一直在研究带有交互式图形示例的EPUB电子书,这是由于EPUB3允许执行“任意” JavaScript代码而成为可能的。

我看到Tensorflow.js团队做了很多工作,使得可以在许多浏览器和各种平台上运行tf.js,但是我没有提到EPUB。

我的问题是:在花时间开始尝试在我的EPUB中嵌入(简单,自定义)tf.js模型之前,还有可能吗?

我问的原因:我只是想知道tf.js是否需要某些关键功能,而EPUB JS环境不提供...? (例如,我想EPUB阅读器将不支持诸如摄像头和麦克风访问之类的操作,但是到目前为止,我的Google搜索还没有提供任何有关该信息的信息。)

如果不可能(或不建议这样做),我可以继续从头开始编写自己的简单JS神经网络代码,但是...使用tf.js可以节省一些工作,并且通过访问其他模型肯定可以提供更大的灵活性,特征。

编辑:预期的问题:

  1. "Why does it have to be EPUB? Why can't you just put it all on the web -- thus, problem solved?" I don't have to stick with EPUB, but that's how the project has been conceived up 'til now. It's a 'fun' constraint I'd like to stick with if possible. Otherwise, yea, it'll all just go on the web. EPUB3 does at least allow you to reuse 'library' JS codes in multiple parts of the document. :-).

  2. "Have you cross-posted this question to Ebooks StackExchange?" Not yet. The TF.js pages led me to post on S.O. first. I do know that there are zero 'tensorflow' questions over there as I write this post.