from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import time

import numpy as np
import pandas as pd
import tensorflow as tf

import utils.utils as utils

class FastGradientSign_AdvGen:

    def __init__(self, cmd_args, input_x_shape, saver, config):
        self.cmd_args = cmd_args
        self.input_x_shape = input_x_shape
        self.saver = saver
        self.config = config
        self.config = config

    def run(self, input_dict):
        x = input_dict["x"]
        y_ = input_dict["y_"]
        y_conv = input_dict["y_conv"]
        keep_prob = input_dict["keep_prob"]
        test_data = input_dict["test_data"]
        test_labels = input_dict["test_labels"]

        checkpoint_path = self.config.get('main', 'checkpoint_path')
        eval_frequency = self.config.getint('main', 'eval_frequency')
        num_classes = self.config.getint('main', 'num_classes')
        image_output_path = self.config.get('main', 'image_output_path')
        adversarial_perturbation_min = self.config.getfloat(
            'main', 'adversarial_perturbation_min')
        adversarial_perturbation_max = self.config.getfloat(