import tensorflow as tf

            learning_rate: epoch_learning_rate,
            training_flag: False
        }

        loss_, acc_ = sess.run([Total_loss, accuracy], feed_dict=test_feed_dict)

        test_loss += loss_
        test_acc += acc_

    test_loss /= test_iteration # average loss
    test_acc /= test_iteration # average accuracy

    summary = tf.Summary(value=[tf.Summary.Value(tag='test_loss', simple_value=test_loss),
                                tf.Summary.Value(tag='test_accuracy', simple_value=test_acc)])

    return test_acc, test_loss, summary

def resnet_model_fn(inputs, training):
    """Our model_fn for ResNet to be used with our Estimator."""

    network = resnet_model.imagenet_resnet_v2(
        resnet_size=18, num_classes=class_num, mode='se', data_format=None)
    inputs= network(inputs=inputs, is_training=training)
    feat = tf.nn.l2_normalize(inputs, 1, 1e-10, name='feat')
