def hyper_norm(self, layer, dimensions, scope="hyper"):
with tf.variable_scope(scope):
zw = rnn_cell._linear(self.hyper_output,
self.hyper_embedding_size, False, scope=scope+ "z")
alpha = rnn_cell._linear(zw, dimensions, False, scope=scope+ "alpha")
result = tf.mul(alpha, layer)
return result
评论列表
文章目录