This commit is contained in:
jeanfad 2016-05-31 22:19:04 +02:00
Родитель 7a4e144bb4
Коммит 2c13ca6fa6
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -28,22 +28,22 @@ def test_tensor_conversion_exceptions(idx, alias_tensor_map, expected):
@pytest.mark.parametrize("idx, alias_tensor_map, expected", [
(0, {'W': AA([])}, ""),
(0, {'W': AA([[[1, 0, 0, 0], [1, 0, 0, 0]]])}, """\
0\t|W 1 1 0 0 0 0 0 0\
0\t|W 1 0 0 0 1 0 0 0\
"""),
(0, {
'W': AA([[[1, 0, 0, 0], [1, 0, 0, 0]]]),
'L': AA([[[2]]])
},
"""\
0\t|L 2 |W 1 1 0 0 0 0 0 0\
0\t|L 2 |W 1 0 0 0 1 0 0 0\
"""),
(0, {
'W': AA([[[1, 0], [1, 0]], [[5, 6], [7, 8]]]),
'L': AA([[[2]]])
},
"""\
0\t|L 2 |W 1 1 0 0
0\t|W 5 7 6 8"""),
0\t|L 2 |W 1 0 1 0
0\t|W 5 6 7 8"""),
])
def test_tensor_conversion_dense(idx, alias_tensor_map, expected):
assert tensors_to_text_format(idx, alias_tensor_map) == expected