Kyrie-Zhao commented on issue #9368:
URL: https://github.com/apache/tvm/issues/9368#issuecomment-951619728
> Can you show your script to trace the model? I got an error during tracing.
>
> > BTW, anyone can provide some guidance regarding the procedure of
implementing & registering an op by yourself?
>
> By this, do you mean you want to work on this yourself, instead of asking
us to do it?
Here are the codes:
...
from swin_transformer import SwinTransformer
net = SwinTransformer()
net = net.cuda()
img = torch.randn(1, 3, 224, 224)
device = torch.device("cuda")
img = img.to(device)
scripted_model = torch.jit.trace(net, img).eval()
input_name = "swin_input"
shape_list = [(input_name, img.shape)]
swin_mod, swin_params = relay.frontend.from_pytorch(scripted_model,
shape_list)
_______
Nah, I am just curious about the procedure of this implementation (to help
me learn more about TVM). But the answer can be yes if it is not that
complicated :D
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]