Remove last vestiges of PrecomputableAffine

This does not exist anymore as a separate layer.
This commit is contained in:
Daniël de Kok 2022-06-09 14:46:13 +02:00
parent fba264382c
commit 11ae4cc3d3
2 changed files with 0 additions and 31 deletions

View File

@ -1,2 +0,0 @@
class PrecomputableAffine:
pass

View File

@ -78,35 +78,6 @@ def test_util_get_package_path(package):
assert isinstance(path, Path) assert isinstance(path, Path)
# @pytest.mark.skip(reason="No precomputable affine")
# def test_PrecomputableAffine(nO=4, nI=5, nF=3, nP=2):
# model = PrecomputableAffine(nO=nO, nI=nI, nF=nF, nP=nP).initialize()
# assert model.get_param("W").shape == (nF, nO, nP, nI)
# tensor = model.ops.alloc((10, nI))
# Y, get_dX = model.begin_update(tensor)
# assert Y.shape == (tensor.shape[0] + 1, nF, nO, nP)
# dY = model.ops.alloc((15, nO, nP))
# ids = model.ops.alloc((15, nF))
# ids[1, 2] = -1
# dY[1] = 1
# assert not model.has_grad("pad")
# d_pad = _backprop_precomputable_affine_padding(model, dY, ids)
# assert d_pad[0, 2, 0, 0] == 1.0
# ids.fill(0.0)
# dY.fill(0.0)
# dY[0] = 0
# ids[1, 2] = 0
# ids[1, 1] = -1
# ids[1, 0] = -1
# dY[1] = 1
# ids[2, 0] = -1
# dY[2] = 5
# d_pad = _backprop_precomputable_affine_padding(model, dY, ids)
# assert d_pad[0, 0, 0, 0] == 6
# assert d_pad[0, 1, 0, 0] == 1
# assert d_pad[0, 2, 0, 0] == 0
def test_prefer_gpu(): def test_prefer_gpu():
current_ops = get_current_ops() current_ops = get_current_ops()
try: try: