# Relay.frontend.form\_onnx return empty params

**URL:** <https://discuss.tvm.apache.org/t/relay-frontend-form-onnx-return-empty-params/15522>\
**Category:** Questions\
**Created:** [August 14, 2023, 12:09pm UTC](https://discuss.tvm.apache.org/t/relay-frontend-form-onnx-return-empty-params/15522 "2023-08-14T12:09:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobo-y](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/bobo-y/32/5024_2.png) [@Bobo-y](https://discuss.tvm.apache.org/u/Bobo-y)\
**Post date:** [August 14, 2023, 12:09pm UTC](https://discuss.tvm.apache.org/t/relay-frontend-form-onnx-return-empty-params/15522/1 "2023-08-14T12:09:38Z")

</div>

hi, i’m new here, i use the fllow code

```
onnx_graph = onnx.load(open(onnx_path, "rb"))
data_shape = (batch_size, 3, 224, 224)
mod, params = relay.frontend.from_onnx(onnx_graph, {"data": data_shape})
with tvm.transform.PassContext(opt_level=3):
    qfunc = relay.quantize.prerequisite_optimize(mod, params=params)
    with tvm.target.cuda():
           with tvm.autotvm.apply_history_best(logfile):
                qfunc = qtz.quantize(qfunc, params, dataset=dataset)

```

but the length of params returned by relay.frontend.from\_onnx is zero. for weight quant, no params is ok?

---

<div class="post-metadata">

**Author:** ![SharynHu](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/sharynhu/32/5255_2.png) [@SharynHu](https://discuss.tvm.apache.org/u/SharynHu)\
**Post date:** [March 18, 2024, 7:04am UTC](https://discuss.tvm.apache.org/t/relay-frontend-form-onnx-return-empty-params/15522/2 "2024-03-18T07:04:36Z")

</div>

Same problem here, have you fixed it out?

---

<div class="post-metadata">

**Author:** ![SharynHu](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/sharynhu/32/5255_2.png) [@SharynHu](https://discuss.tvm.apache.org/u/SharynHu)\
**Post date:** [March 18, 2024, 8:20am UTC](https://discuss.tvm.apache.org/t/relay-frontend-form-onnx-return-empty-params/15522/3 "2024-03-18T08:20:41Z")

</div>

I check the source code, seem like if the operator freeze the parameters, then it will be treated as an internal constant of the operator, which won’t be added to the parameter dict. It won’t affect the inferece of the model because everything is internally stored. Hope this help.
