MCPcopy Create free account
hub / github.com/HazyResearch/spacetime / backward

Method backward

model/functional/toeplitz.py:108–112  ·  view source on GitHub ↗
(ctx, grad)

Source from the content-addressed store, hash-verified

106
107 @staticmethod
108 def backward(ctx, grad):
109 u, v = ctx.saved_tensors
110 d_u = triangular_toeplitz_multiply_padded_(grad.flip(-1), v).flip(-1)
111 d_v = triangular_toeplitz_multiply_padded_(grad.flip(-1), u).flip(-1)
112 return d_u, d_v
113
114class TriangularToeplitzMultPaddedFast(torch.autograd.Function):
115 """ Trade off speed (20-25% faster) for more memory (20-25%) """

Callers

nothing calls this directly

Tested by

no test coverage detected