conv1 만 프린트 하는 command
print (tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope='conv1'))
variable 읽는 코드 (sort팅)
reader = tf.train.load_checkpoint("/tmp/mj/cifar10_train")
variable_map = reader.get_variable_to_shape_map()
names = (variable_map.keys())
result = []
for name in names:
result.append((name, variable_map[name]))
pprint.pprint(result)
reader = tf.train.NewCheckpointReader("/tmp/mj/cifar10_train/model.ckpt-0")
print (reader)
variables = reader.get_variable_to_shape_map()
print (variables)
# for ele in variables:
# print (ele)
print ("\n")
vars = tf.train.list_variables("/tmp/mj/cifar10_train")
pprint.pprint(vars)
전체 Variables Print 하기
pprint.pprint(tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope=''))
chkp.print_tensors_in_checkpoint_file("/tmp/mj/cifar10_train/model.ckpt-0", all_tensors=True, tensor_name='')