How to add training = True in tensorflow-java?
未关闭
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 928
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
描述
The models that I have from Python works only if I provide training = True as well in Python.
for instance in Python;
import tensorflow as tf
my_model = tf.keras.models.load_model("model")
prdct = my_model(input_image, training = True)
Here, if I do not provide training = True, the values in prdct.numpy() are all "nan".
I have the same problem in tensorflow/java as well. I wonder if there is a way to give option training = True in tensorflow/java?
Here is the java code:
TFloat32 ImagePredicted = (TFloat32) sess
.runner()
.feed(input_layer, inputTensor)
.fetch(outputLayer)
.run()
.get(0);
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中显示的 Java Runner 代码开始,检查已加载模型如何公开输入和选项,并将其与 Python 调用的 training 参数进行比较。确定 Java API 是否能够为导出的模型传递此设置,并通过一个有针对性的示例或测试记录或验证受支持的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, tensorflow
- 领域
- api, machine-learning
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100