import tensorflow as tf

        # 定義變數
        # self.tfs = tf.placeholder(tf.float32, [None, image_features], 'state')
        self.tfdc_r = tf.placeholder(tf.float32, [None, 1], 'discounted_r')
        # 建立網路層
        l1 = tf.layers.dense(
            inputs=pre_s,
            units=100,  # number of hidden units
            activation=tf.nn.relu,
            name='l1'
        )
        self.v = tf.layers.dense(
            inputs=l1,
            units=1,  # output units
            activation=None,
            name='V'
        )
        # 計算損益
        self.advantage = self.tfdc_r - self.v
        self.closs = tf.reduce_mean(tf.square(self.advantage))
        self.ctrain_op = tf.train.AdamOptimizer(C_LR).minimize(self.closs)
