CustomLSTMLayer.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:seq2seq-lasagne 作者: erfannoury 项目源码 文件源码
def get_output_shape_for(self, input_shapes):
        # The shape of the input to this layer will be the first element
        # of input_shapes, whether or not a mask input is being used.
        input_shape = input_shapes[0]
        # When only_return_final is true, the second (sequence step) dimension
        # will be flattened
        if self.only_return_final:
            return input_shape[0], self.num_units
        # Otherwise, the shape will be (n_batch, n_steps, num_units)
        else:
            return input_shape[0], input_shape[1], self.num_units

    # Layer Normalization
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号