assignment3_coding/starter_code 2/code/policy_network.py
def add_placeholders_op(self):
    """
    Add placeholders for observation, action, and advantage:
        self.observation_placeholder, type: tf.float32
        self.action_placeholder, type: depends on the self.discrete
        self.advantage_placeholder, type: tf.float32

    HINT: Check self.observation_dim and self.action_dim
    HINT: In the case of continuous action space, an action will be specified by
    'self.action_dim' float32 numbers (i.e. a vector with size 'self.action_dim')
    """
    #######################################################
    #########   YOUR CODE HERE - 4-6 lines.   ############

    self.observation_placeholder = tf.placeholder(tf.float32, (None, self.observation_dim))
    if gym.spaces.Discrete:
        self.action_placeholder = tf.placeholder(tf.int32, (None, ))
    else:
        self.action_placeholder = tf.placeholder(tf.float32, (None, self.action_dim))
    self.advantage_placeholder = tf.placeholder(tf.float32, (None, ))

    #######################################################
    #########          END YOUR CODE.          ############

    Add placeholders for observation, action, and advantage:
        self.observation_placeholder, type: tf.float32
        self.action_placeholder, type: depends on the self.discrete
        self.advantage_placeholder, type: tf.float32

    HINT: Check self.observation_dim and self.action_dim
    HINT: In the case of continuous action space, an action will be specified by
    'self.action_dim' float32 numbers (i.e. a vector with size 'self.action_dim')
    


Check self.observation_dim and self.action_dim
HINT: In the case of continuous action space, an action will be specified by
'self.action_dim' float32 numbers
Check self . observation_dim and self . action_dim HINT : In the case of continuous action space an action will be specified by ' self . action_dim ' float32 numbers
def add_placeholders_op(self):
    self.observation_placeholder = tf.placeholder(tf.float32, (None, self.observation_dim))
    if gym.spaces.Discrete:
        self.action_placeholder = tf.placeholder(tf.int32, (None, ))
    else:
        self.action_placeholder = tf.placeholder(tf.float32, (None, self.action_dim))
    self.advantage_placeholder = tf.placeholder(tf.float32, (None, ))
def add_placeholders_op ( self ) : self . observation_placeholder = tf . placeholder ( tf . float32 , ( None , self . observation_dim ) ) if gym . spaces . Discrete : self . action_placeholder = tf . placeholder ( tf . int32 , ( None , ) ) else : self . action_placeholder = tf . placeholder ( tf . float32 , ( None , self . action_dim ) ) self . advantage_placeholder = tf . placeholder ( tf . float32 , ( None , ) )
Add placeholders for observation, action, and advantage:
self.observation_placeholder, type: tf.float32
self.action_placeholder, type: depends on the self.discrete
self.advantage_placeholder, type: tf.float32
Add placeholders for observation action and advantage : self . observation_placeholder type : tf . float32 self . action_placeholder type : depends on the self . discrete self . advantage_placeholder type : tf . float32
"""
    Add placeholders for observation, action, and advantage:
        self.observation_placeholder, type: tf.float32
        self.action_placeholder, type: depends on the self.discrete
        self.advantage_placeholder, type: tf.float32

    HINT: Check self.observation_dim and self.action_dim
    HINT: In the case of continuous action space, an action will be specified by
    'self.action_dim' float32 numbers (i.e. a vector with size 'self.action_dim')
    """ ####################################################### #########   YOUR CODE HERE - 4-6 lines.   ############ ####################################################### #########          END YOUR CODE.          ############
self