Is there have a function or method to deal : Proxy object cannot be iterated ?
import torch import torch.nn as nn class M(nn.Module): def __init__(self): super().__init__() def forward(self, x): """ x.size() -> (batch, seq, feature) """ _, seq, _ = x.size() for i in range(seq): ... m = M() import torch.fx tracer = torch.fx.Tracer().trace(m)
type(range(seq)) -> Proxy
seq type is
Proxy, is there have a function change
Or not to trace the seq variable, which not to change it’s type.