Following pattern in code seems to break dynamo graph tracing
See original GitHub issueimport torch
import torchdynamo
from torch import nn
class TestModel(nn.Module):
def __init__(self) -> None:
super().__init__()
self.linears = nn.Sequential(
nn.Linear(100, 100),
nn.Linear(100, 100),
nn.Linear(100, 100),
nn.Linear(100, 100),
)
def forward(self, x):
all_but_last, last = self.linears[:-1], self.linears[-1]
x = all_but_last(x)
x = last(x)
return x
# @torchdynamo.optimize('eager')
def toy_example(model, input):
return model(input)
model = TestModel().cuda()
x = torch.rand((8, 100), device='cuda')
for _ in range(10):
toy_example(model, x)
Its okay if the answer is, this is not supported but just wanted to raise it as fyi
Issue Analytics
- State:
- Created a year ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Setting Rotation along a path - Packages - Dynamo Forum
Below is a quick overview of a method to create an array of family instances on a curve and rotate them to always...
Read more >Can't place nodes immediately after opening graph, "running ...
I'm trying to figure out how to reinstall Dynamo for Revit 2020 and ... addins folder it seems to break functionality while using...
Read more >DynamoPrimer-Print1_3.pdf - primer.dynamobim.org
Code in Nodes - How can I start extending Dynamo with my own code? ... In Dynamo, the Graph and the 3D results...
Read more >How to create custom Dynamo Extensions - teocomi
We'll see how extensions can be used to interact with nodes on the canvas, with the graph itself and with the Dynamo View...
Read more >Computational BIM Workshop: Beginner Dynamo for Revit
We'll explore how the two tools interface; the basics of building a Dynamo graph; and the logic, form, and structure of graphs—and we'll...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My mistake. Apologies @ngoyal2707
gotcha 😃 thanks - can you port this issue to pytorch? Just realized its in dynamo, and this repo is effectively closed.