Variable scopes in Tensorflow
问题 I am having problems making effective usage of variable scopes. I want to define some variables for weights, biases and inner state of a simple recurrent network. I call get_saver() once after defining the default graph. I then iterate over a batch of samples using tf.scan . import tensorflow as tf import math import numpy as np INPUTS = 10 HIDDEN_1 = 2 BATCH_SIZE = 3 def batch_vm2(m, x): [input_size, output_size] = m.get_shape().as_list() input_shape = tf.shape(x) batch_rank = input_shape