Guanghan / ROLO

ROLO is short for Recurrent YOLO, aimed at simultaneous object detection and tracking
Apache License 2.0
879 stars 278 forks source link

Variable rnn/lstm_cell/weights/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope? #16

Open NinetailsBear9 opened 7 years ago

NinetailsBear9 commented 7 years ago

I want to retrain the model,but this error happens,please tell me how to solve it~

johnpisces2 commented 6 years ago

I have the same issue. How to sovle it??

marcvdinh commented 6 years ago

I have the same issue when I try to train the model. Is there any updates ?

123liluky commented 6 years ago

I have the same issue. Have you solved the problem?

123liluky commented 6 years ago

referencing http://blog.csdn.net/qq_25737169/article/details/77856961. When I tried experiment 1, I revised

def train_20(self):
        print("TRAINING ROLO...")
        log_file = open("output/trainging-20-log.txt", "a") #open in append mode
        with tf.variable_scope('for_reuse_scope'):
            self.build_networks()
            ''' TUNE THIS'''
            num_videos = 20
            epoches = 20 * 100
            # Use rolo_input for LSTM training
            pred = self.LSTM_single('lstm_train', self.x, self.istate, self.weights, self.biases)
        self.pred_location = pred[0][:, 4097:4101]
        self.correct_prediction = tf.square(self.pred_location - self.y)
        self.accuracy = tf.reduce_mean(self.correct_prediction) * 100
        self.learning_rate = 0.00001. 

It worked.

Tomingz commented 6 years ago

when I run ROLO_network_test_all.py: ValueError: Variable rnn/lstm_cell/kernel does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope? how to sovle it?

chenharel1 commented 5 years ago

Thanks @123liluky , your solution worked for me.