# From tensorflow official tutorial
import tensorflow as tf

from Tensorflow.base.base_model import BaseModel

class ConvModel(BaseModel):
    def __init__(self,config):
        super(ConvModel,self).__init__(config)
        self.build_model()
        self.summaries=None
    def build_model(self):
        # define the placeholder to pass the data and the ground_truth

        self.is_training = tf.placeholder(tf.bool)

        self.x = tf.placeholder(tf.float32, shape=[None]+self.config.state_size)
        self.y = tf.placeholder(tf.float32, shape=[None, 10])

        # network_architecture
        h_conv1 = tf.layers.conv2d(self.x, 32, kernel_size=[3, 3], strides=[2, 2], name='conv1')
        flat = tf.contrib.layers.flatten(h_conv1)
        d1 = tf.layers.dense(flat, 512, activation=tf.nn.relu, name="densee2")
        d2 = tf.layers.dense(d1, 10)

        with tf.name_scope("loss"):
            self.cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=self.y, logits=d2))
            self.train_step = tf.train.AdamOptimizer(self.config.lr).minimize(self.cross_entropy)
            correct_prediction = tf.equal(tf.argmax(d2, 1), tf.argmax(self.y, 1))
            self.accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))



a81bec3e7cf882ee62e2cf5084468b3df89b7bee
<mask token>


class ConvModel(BaseModel):
    <mask token>
    <mask token>

<mask token>


class ConvModel(BaseModel):

    def __init__(self, config):
        super(ConvModel, self).__init__(config)
        self.build_model()
        self.summaries = None
    <mask token>

<mask token>


class ConvModel(BaseModel):

    def __init__(self, config):
        super(ConvModel, self).__init__(config)
        self.build_model()
        self.summaries = None

    def build_model(self):
        self.is_training = tf.placeholder(tf.bool)
        self.x = tf.placeholder(tf.float32, shape=[None] + self.config.
            state_size)
        self.y = tf.placeholder(tf.float32, shape=[None, 10])
        h_conv1 = tf.layers.conv2d(self.x, 32, kernel_size=[3, 3], strides=
            [2, 2], name='conv1')
        flat = tf.contrib.layers.flatten(h_conv1)
        d1 = tf.layers.dense(flat, 512, activation=tf.nn.relu, name='densee2')
        d2 = tf.layers.dense(d1, 10)
        with tf.name_scope('loss'):
            self.cross_entropy = tf.reduce_mean(tf.nn.
                softmax_cross_entropy_with_logits(labels=self.y, logits=d2))
            self.train_step = tf.train.AdamOptimizer(self.config.lr).minimize(
                self.cross_entropy)
            correct_prediction = tf.equal(tf.argmax(d2, 1), tf.argmax(self.
                y, 1))
            self.accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.
                float32))

import tensorflow as tf
from Tensorflow.base.base_model import BaseModel


class ConvModel(BaseModel):

    def __init__(self, config):
        super(ConvModel, self).__init__(config)
        self.build_model()
        self.summaries = None

    def build_model(self):
        self.is_training = tf.placeholder(tf.bool)
        self.x = tf.placeholder(tf.float32, shape=[None] + self.config.
            state_size)
        self.y = tf.placeholder(tf.float32, shape=[None, 10])
        h_conv1 = tf.layers.conv2d(self.x, 32, kernel_size=[3, 3], strides=
            [2, 2], name='conv1')
        flat = tf.contrib.layers.flatten(h_conv1)
        d1 = tf.layers.dense(flat, 512, activation=tf.nn.relu, name='densee2')
        d2 = tf.layers.dense(d1, 10)
        with tf.name_scope('loss'):
            self.cross_entropy = tf.reduce_mean(tf.nn.
                softmax_cross_entropy_with_logits(labels=self.y, logits=d2))
            self.train_step = tf.train.AdamOptimizer(self.config.lr).minimize(
                self.cross_entropy)
            correct_prediction = tf.equal(tf.argmax(d2, 1), tf.argmax(self.
                y, 1))
            self.accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.
                float32))

# From tensorflow official tutorial
import tensorflow as tf

from Tensorflow.base.base_model import BaseModel

class ConvModel(BaseModel):
    def __init__(self,config):
        super(ConvModel,self).__init__(config)
        self.build_model()
        self.summaries=None
    def build_model(self):
        # define the placeholder to pass the data and the ground_truth

        self.is_training = tf.placeholder(tf.bool)

        self.x = tf.placeholder(tf.float32, shape=[None]+self.config.state_size)
        self.y = tf.placeholder(tf.float32, shape=[None, 10])

        # network_architecture
        h_conv1 = tf.layers.conv2d(self.x, 32, kernel_size=[3, 3], strides=[2, 2], name='conv1')
        flat = tf.contrib.layers.flatten(h_conv1)
        d1 = tf.layers.dense(flat, 512, activation=tf.nn.relu, name="densee2")
        d2 = tf.layers.dense(d1, 10)

        with tf.name_scope("loss"):
            self.cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=self.y, logits=d2))
            self.train_step = tf.train.AdamOptimizer(self.config.lr).minimize(self.cross_entropy)
            correct_prediction = tf.equal(tf.argmax(d2, 1), tf.argmax(self.y, 1))
            self.accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))


