chengdazhi opened a new issue #10459: Does gluon support dynamic graph like if clause? URL: https://github.com/apache/incubator-mxnet/issues/10459 Hi, I have found that if clause in Block.forward() is executed in main thread and causes delay if outputs of former operators are related. For example: > # pseudo code > class DemoBlock(Block): > def __init__(...): > self.fc = nn.Dense(10) > > def forward(self, x): > x = self.fc(x) > if x.sum() > 0: > return x > else: > return x+1 when executing DemoBlock.forward and starting to execute if clause, main threads waits for Dense block to finish computation. So does gluon support if clauses like this?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services