报错信息为:Attempt to have a second RNNCell use the weights of a variable scope that already has weights: 'rnn/basic_lstm_cell'; and the cell was not constructed as BasicLSTMCell(..., reuse=True). To share the weights of an RNNCell, simply reuse it in your second calculation, or create a new one with the argument reuse=True.
在讲代码修改添加scope以后,问题可以解决,但scope每次只能又一次就要换值,如:outputs,states = rnn.static_rnn(lstm_cell,x,dtype=tf.float32,scope='b')
在跑RNN的代码的时候报错。报错信息为:Attempt to have a second RNNCell use the weights of a variable scope that already has weights: 'rnn/basic_lstm_cell'; and the cell was not constructed as BasicLSTMCell(..., reuse=True). To share the weights of an RNNCell, simply reuse it in your second calculation, or create a new one with the argument reuse=True.
在讲代码修改添加scope以后,问题可以解决,但scope每次只能又一次就要换值,如:outputs,states = rnn.static_rnn(lstm_cell,x,dtype=tf.float32,scope='b')
在跑RNN的代码的时候报错。报错信息为:Attempt to have a second RNNCell use the weights of a variable scope that already has weights: 'rnn/basic_lstm_cell'; and the cell was not constructed as BasicLSTMCell(..., reuse=True). To share the weights of an RNNCell, simply reuse it in your second calculation, or create a new one with the argument reuse=True.
在讲代码修改添加scope以后,问题可以解决,但scope每次只能又一次就要换值,如:outputs,states = rnn.static_rnn(lstm_cell,x,dtype=tf.float32,scope='b')