def test_splice_layer():
"""Test method splices tensors correctly"""
# Create spliced and added layers via splicing function
list_of_spliced_layers = _splice_layer(SPLICING_TENSOR, 3)
# Add each of the layers together
x = add(list_of_spliced_layers)
# Create the spliced and added layers by hand
check_layer = K.constant(9, shape=(3, 4))
# Check the math
assert np.allclose(K.eval(check_layer), K.eval(x), atol=ATOL)
评论列表
文章目录