CriticNetwork.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:ddpg-ros-keras 作者: robosamir 项目源码 文件源码
def create_critic_network(self, state_size,action_dim):
        print("Now we build the model")
        S = Input(shape=[state_size])  
        A = Input(shape=[action_dim],name='action2')   
        w = Dense(HIDDEN1_UNITS, init='he_uniform',activation='relu')(S)
        h = merge([w,A],mode='concat')    
        h3 = Dense(HIDDEN2_UNITS, init='he_uniform',activation='relu')(h)
        V = Dense(action_dim,init=lambda shape, name: uniform(shape, scale=3e-3, name=name),activation='linear')(h3)   
        model = Model(input=[S,A],output=V)
        adam = Adam(lr=self.LEARNING_RATE)
        model.compile(loss='mse', optimizer=adam)
        return model, A, S
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号