diff --git a/README.md b/README.md index a12a9ce..a036360 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ This issue was discussed here: [Support Channel groups in convolutional layers # ### Main Dependencies ``` Python 3 or above - tensorflow 1.3.0 + tensorflow 1.3.0 or above (~1.12) numpy 1.13.1 tqdm 4.15.0 easydict 1.7 diff --git a/model.py b/model.py index 1150830..c100cda 100644 --- a/model.py +++ b/model.py @@ -88,7 +88,10 @@ def __init_output(self): self.optimizer = tf.train.AdamOptimizer(learning_rate=self.args.learning_rate) self.train_op = self.optimizer.minimize(self.loss) # This is for debugging NaNs. Check TensorFlow documentation. - self.check_op = tf.add_check_numerics_ops() + try: + self.check_op = tf.add_check_numerics_ops() + except Exception as e: + print('tf.add_check_numerics_ops() is not compatible with TensorFlow') # Output and Metrics self.y_out_softmax = tf.nn.softmax(self.logits) diff --git a/train.py b/train.py index fbaf5bf..0285213 100644 --- a/train.py +++ b/train.py @@ -67,7 +67,7 @@ def __load_imagenet_weights(self): run_list.append(tf.assign(variable, value)) self.sess.run(run_list) print("Weights loaded\n\n") - except KeyboardInterrupt: + except Exception as e: print("No pretrained ImageNet weights exist. Skipping...\n\n") ############################################################################################################