def xavier_initializer(shape):
dim_sum = np.sum(shape)
if len(shape) == 1:
dim_sum += 1
bound = np.sqrt(2.0 / dim_sum)
return tf.random_uniform(shape, minval=-bound, maxval=bound)
# # Assigning network variables to target network variables
# def assign_network_to_target():
# update_wfc = tf.assign(w_fc_target, w_fc)
# update_bfc = tf.assign(b_fc_target, b_fc)
# sess.run(update_wfc)
# sess.run(update_bfc)
# cell_target = cell
# Input
评论列表
文章目录