tensorflow / tensorflow/java

How to represent the [variable_scope] and [get_variable] in tensorflow java ?

未关闭
#433 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Java
星标
928
派生
227
PR 合并指标
30 天内没有已合并 PR

描述

HI :
write the tensorflow code in python ,we always use with the variable_scope and get_variable method , like this

        with tf.compat.v1.variable_scope('Qifficulty'):
            question_difficulty_weights = tf.compat.v1.get_variable('weights', [q.get_shape()[-1], 1],
                                                          initializer= tf.initializers.glorot_uniform(seed=0))
                                                          # layers.xavier_initializer(seeed=0))
            question_difficulty_biases = tf.compat.v1.get_variable('biases', [1],
                                                         initializer=tf.compat.v1.zeros_initializer())
            question_difficulty = tf.nn.tanh(tf.matmul(q, question_difficulty_weights) + question_difficulty_biases)
 but in  java ,we can not use  with key word , and   I also can not  find [variable_scope] and [get_variable]  two apis.  

I just want to know How to represent the [variable_scope] and [get_variable] in tensorflow java ,could we give me a damo about these?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查 TensorFlow Java API 文档,查找 issue 中所示 Python API variable_scope 和 get_variable 的对应项。提供一个涵盖所需变量创建和作用域行为的 Java 示例,并说明是否存在直接对应项。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, tensorflow
领域
machine-learning
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。