# Converting a ScriptModule to Trace

**URL:** <https://discuss.pytorch.org/t/converting-a-scriptmodule-to-trace/124647>\
**Category:** jit\
**Created:** [June 21, 2021, 12:57pm UTC](https://discuss.pytorch.org/t/converting-a-scriptmodule-to-trace/124647 "2021-06-21T12:57:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjibansg](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sanjibansg/32/39462_2.png) [@sanjibansg](https://discuss.pytorch.org/u/sanjibansg)\
**Post date:** [June 21, 2021, 12:57pm UTC](https://discuss.pytorch.org/t/converting-a-scriptmodule-to-trace/124647/1 "2021-06-21T12:57:01Z")

</div>

Is it possible to convert a script module to trace with dummy input tensors. I tried with code

```auto
model=torch.jit.load('model.pt')
dummy=torch.rand((1,3,224,224))
traced=torch.jit.trace(model,dummy)

```

Following warning was thrown:

```auto
UserWarning: The input to trace is already a ScriptModule, tracing it is a no-op. Returning the object as is.

```
