test_bidirectional_rnn_encoder.py 文件源码

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

项目:yoctol-keras-layer-zoo 作者: Yoctol 项目源码 文件源码
def test_mask_value(self):
        result = self.model.predict(self.data)
        np.testing.assert_array_almost_equal(
            result[:, 1:, :],
            np.zeros((
                self.data_size,
                self.max_length - 1,
                self.encoding_size
            ))
        )
        np.testing.assert_equal(
            np.any(
                np.not_equal(
                    result[:, 0:1, self.cell_units:],
                    np.zeros((self.data_size, 1, self.cell_units))
                )
            ),
            True
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号