コード例 #1
0
 def testLogVariables_with_arg(self):
     tf.get_default_graph().add_to_collection("config", {"version": 1})
     with tf.variable_scope("m1"):
         v1 = tf.get_variable("v1", shape=[3, 4])
     with tf.device("/gpu"):
         with tf.variable_scope("m2"):
             v2 = tf.get_local_variable("v2", shape=[5, 6])
     snt.log_variables([v2, v1])
コード例 #2
0
ファイル: util_test.py プロジェクト: ccchang0111/sonnet
 def testLogVariables_with_arg(self):
   tf.get_default_graph().add_to_collection("config", {"version": 1})
   with tf.variable_scope("m1"):
     v1 = tf.get_variable("v1", shape=[3, 4])
   with tf.device("/gpu"):
     with tf.variable_scope("m2"):
       v2 = tf.get_local_variable("v2", shape=[5, 6])
   snt.log_variables([v2, v1])