# Unexpected input data type

**URL:** <https://discuss.huggingface.co/t/unexpected-input-data-type/19318>\
**Category:** 🤗Optimum\
**Created:** [June 18, 2022, 9:58am UTC](https://discuss.huggingface.co/t/unexpected-input-data-type/19318 "2022-06-18T09:58:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Talha](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Talha](https://discuss.huggingface.co/u/Talha)\
**Post date:** [June 18, 2022, 9:58am UTC](https://discuss.huggingface.co/t/unexpected-input-data-type/19318/1 "2022-06-18T09:58:34Z")

</div>

Hi, I am running the example given on optimum [github page](https://github.com/huggingface/optimum/) and i am getting the following error on a window machine

```auto
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Unexpected input data type. Actual: (tensor(int32)) , expected: (tensor(int64))

```

Though i did not get the error when i run it on ubuntu machine.

Complete error

```auto
Traceback (most recent call last):
  File "main.py", line 34, in <module>
    read_root('how are you')
  File "main.py", line 29, in read_root
    ort_outputs = ort_model.evaluation_loop(tokenized_ds)
  File "D:\\facebook_Senti\venv\lib\site-packages\optimum\onnxruntime\model.py", line 98, in evaluation_loop
    preds = session.run(self.onnx_named_outputs, onnx_inputs)
  File "D:\facebook_Senti\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 192, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Unexpected input data type. Actual: (tensor(int32)) , expected: (tensor(int64))

```

---

<div class="post-metadata">

**Author:** ![echarlaix](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/echarlaix/32/21754_2.png) [@echarlaix](https://discuss.huggingface.co/u/echarlaix)\
**Post date:** [June 29, 2022, 12:26pm UTC](https://discuss.huggingface.co/t/unexpected-input-data-type/19318/2 "2022-06-29T12:26:47Z")

</div>

Let’s move this discussion to [InvalidArgument: [ONNXRuntimeError] : 2 : INVALID\_ARGUMENT : Unexpected input data type. Actual: (tensor(int32)) , expected: (tensor(int64) - #2 by echarlaix](https://discuss.huggingface.co/t/invalidargument-onnxruntimeerror-2-invalid-argument-unexpected-input-data-type-actual-tensor-int32-expected-tensor-int64/19206/2) as you are describing the same problem there.
