- tf.Variable()
W = tf.Variable(, name=)
作用:用于生成一个初始值为value的变量
2. tf.get_variable()
W = tf.get_variable(name, shape=None, dtype=tf.float32, initializer=None,
regularizer=None, trainable=True, collections=None)
作用:获取已经存在的变量,若不存在则创建,其可用于参数复用
W = tf.Variable(, name=)
作用:用于生成一个初始值为value的变量
2. tf.get_variable()
W = tf.get_variable(name, shape=None, dtype=tf.float32, initializer=None,
regularizer=None, trainable=True, collections=None)
作用:获取已经存在的变量,若不存在则创建,其可用于参数复用