ActorNetwork.py 文件源码

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

项目:gym-sandbox 作者: suqi 项目源码 文件源码
def create_actor_network(self, state_size,action_dim):
        print("Now we build the model")
        S = Input(shape=[state_size])   
        h0 = Dense(HIDDEN1_UNITS, activation='relu')(S)
        h1 = Dense(HIDDEN2_UNITS, activation='relu')(h0)

        # ,init=lambda shape, name: RandomNormal(shape, scale=1e-4, name=name)
        V = Dense(action_dim,activation='tanh')(h1)
        model = Model(input=S,output=V)
        return model, model.trainable_weights, S
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号