czy36mengfei / tensorflow2_tutorials_chinese

tensorflow2中文教程,持续更新(当前版本:tensorflow2.0),tag: tensorflow 2.0 tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问,tf2如何实现共享变量?

LiuFG opened this issue · comments

commented

tf1可以通过设用tf.variable_scope设置前缀,然后通过tf.get_variable获得相同name和维度的变量,从而实现权重共享。tf2如何实现呢?