Xiaohang Zhao

Results 1 issues of Xiaohang Zhao

Notebook “Tutorial_05 - An understandable example to implement Multi-LSTM for MNIST”有这样一段代码。 ``` with tf.variable_scope('RNN'): for timestep in range(timestep_size): if timestep > 0: tf.get_variable_scope().reuse_variables() ``` 这个issue是关于`tf.get_variable_scope().reuse_variables()`合理性的猜测。希望同博主一起讨论。 首先,我发现tensorflow新旧版本在定义RNNcell的`__call__`方法时有不同的处理。旧版本直接定义`__call__`方法,新版本则要先继承`_LayerRNNCell`再定义`call` 和`build` 方法(而非直接定义`__call__`)。 为何这么处理?个人认为,使用RNNcell分为两个步骤:第一,实例化一个RNNcell;第二,调用声明的RNNcell实例进行计算。定义`__call__`方法就是为了简化用RNNcell的实例进行运算时的API调用。另外,大部分关于variable sharing的考虑和决策都发生在第一步。...