Is there a way to convert Proxy to base type?
such as :
import torch
import torch.nn as nn
from torch.fx import symbolic_trace
class M(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
x = x.size(1)
a = torch.randn(x)
return a
m = M()
symbolic_trace(m)
while the type of x is Proxy, and the function randn can’t use Proxy.
So, I need to convert Proxy to int type.
please help me, thanks a lot.