def parameters(self):
"""Return weights of the neural network.
This returns a list of tf.Variables. Please note that these can not
simply be updated by assignment. See the parameters.setter docstring
for more information.
The list of tf.Variables can be directly accessed through the
attribute `W`.
"""
if self.sess is None:
return tf.get_default_session().run(self.W_action + self.W_var)
else:
return self.sess.run(self.W_action + self.W_var)
评论列表
文章目录