From bce713181a2fe8d53d8f85204e953b471382e582 Mon Sep 17 00:00:00 2001 From: ashutosh_hathidara Date: Thu, 25 Jul 2019 12:10:22 +0530 Subject: [PATCH] Replaced Depricated scalar_summary with new functions of tf --- code/cifar_train_baseline.py | 2 +- code/resnet_model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/cifar_train_baseline.py b/code/cifar_train_baseline.py index 4cb8eca..4674761 100644 --- a/code/cifar_train_baseline.py +++ b/code/cifar_train_baseline.py @@ -247,7 +247,7 @@ def train_inception_baseline(max_step_run): labels=one_hot_labels, logits=logits) total_loss = tf.reduce_mean(total_loss) - tf.contrib.deprecated.scalar_summary('Total Loss', total_loss) + tf.compat.v1.summary.scalar('Total Loss', total_loss) decay_steps = int( num_samples_per_epoch / FLAGS.batch_size * FLAGS.num_epochs_per_decay) diff --git a/code/resnet_model.py b/code/resnet_model.py index da07529..d3a90c6 100644 --- a/code/resnet_model.py +++ b/code/resnet_model.py @@ -124,7 +124,7 @@ def build_model(self): def _build_train_op(self): """Build training specific ops for the graph.""" self.lrn_rate = tf.constant(self.hps.lrn_rate, tf.float32) - tf.contrib.deprecated.scalar_summary('learning rate', self.lrn_rate) + tf.compat.v1.summary.scalar('learning rate', self.lrn_rate) trainable_variables = tf.trainable_variables() grads = tf.gradients(self.cost, trainable_variables)