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

关于json模型 #2

Open
223yang opened this issue May 1, 2022 · 4 comments
Open

关于json模型 #2

223yang opened this issue May 1, 2022 · 4 comments

Comments

@223yang
Copy link

223yang commented May 1, 2022

你好,请问你的json格式模型是通过什么方式获得的呀?是自己用js训练的嘛?
我现在找不到很好的获得该格式模型的途径,我尝试过转换.h5文件;从tensorflow hub模型库下载,但好像都用不了!
所以想请问博主有什么好的建议吗

@Sencc
Copy link
Owner

Sencc commented May 4, 2022

你好,可以用脚本将tensorflow训练好的模型转换成tensorflow.js可用的模型,我这个是用savedmodel格式的模型转换的。具体可以参考一下tensorflow.js官方的教程,希望可以帮到你:)

@shuizhuyu1015
Copy link

你好,可以用脚本将tensorflow训练好的模型转换成tensorflow.js可用的模型,我这个是用savedmodel格式的模型转换的。具体可以参考一下tensorflow.js官方的教程,希望可以帮到你:)

大佬好,我基于此模型SSD MobileNet V1 FPN 640x640训练好模型之后,并用tensorflowjs_converter转换好之后,在小程序里用coco-ssd按照你的方法加载,报错
Tensor must have a shape comprised of positive integers but got shape [100,].
是选取的官方模型不对,还是训练使用的图片大小不对啊

@Sencc
Copy link
Owner

Sencc commented Mar 3, 2023

@shuizhuyu1015 出现这个问题应该是数据的输入有问题,可以修改输入数据的tensor,或者在转换模型的时候reshape

@shuizhuyu1015
Copy link

shuizhuyu1015 commented Mar 3, 2023

@shuizhuyu1015 出现这个问题应该是数据的输入有问题,可以修改输入数据的tensor,或者在转换模型的时候reshape

这个reshape需要怎么转,不确定了,我的模型转换成js可读的是这样子的
image

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

No branches or pull requests

3 participants