Skip to content

Commit

Permalink
disable cache scripting prior
Browse files Browse the repository at this point in the history
  • Loading branch information
caillonantoine committed Apr 26, 2022
1 parent 783dcee commit 9455a79
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions export_prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ def forward(self, temp: torch.Tensor):
x = x[..., -1:]
model(x)

logging.info("scripting cached modules")
n_cache = 0

cached_modules = [
cc.CachedConv1d,
]

for n, m in model.named_modules():
if any(list(map(lambda c: isinstance(m, c), cached_modules))):
m.script_cache()
n_cache += 1

logging.info(f"{n_cache} cached modules found and scripted")

logging.info("script model")
model = TraceModel(model)
model = torch.jit.script(model)
Expand Down

0 comments on commit 9455a79

Please sign in to comment.