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
评论列表
文章目录