Rate this Page

strict_fusion#

classtorch.jit.strict_fusion[source]#

Give errors if not all nodes have been fused in inference, or symbolically differentiated in training.

Example:Forcing fusion of additions.

@torch.jit.scriptdeffoo(x):withtorch.jit.strict_fusion():returnx+x+x