如何解决无法在 Android 上使用文本生成
我用这个 google colab(https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/text/text_generation.ipynb#scrollTo=ktovv0RFhrkn) 创建了我自己的文本生成模型
但是当我尝试在 Andorid 上使用它时 (https://towardsdatascience.com/on-device-machine-learning-text-generation-on-android-6ad940c00911)
我收到一个错误:
Cannot convert between a TensorFlowLite tensor with type FLOAT32 and a Java object of type [I (which is compatible with the TensorFlowLite type INT32).at org.tensorflow.lite.Tensor.throwIfTypeIsIncompatible.
我的问题是有没有办法将我的张量 dtype 从 int32
更改为 float32
或更改应用程序以在 int32
中接受它?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。