def create_actor_network(self, state_size,action_dim):
print("Now we build the model")
model = Sequential()
S = Input(shape=[state_size])
h0 = Dense(100, init='he_uniform',activation='relu')(S)
h1 = Dense(100, init='he_uniform',activation='relu')(h0)
V = Dense(8, init=lambda shape, name: uniform(shape, scale=3e-3, name=name),activation='tanh')(h1)
model = Model(input=S,output=V)
return model, model.trainable_weights, S
评论列表
文章目录