hhsecond:

int array[10]; 
...
torch::Tensor tensor_in = torch::from_blob(array, {1, 10});



From the docs, from_blob takes a void* and the (optional) TensorOptions specify the type, probably defaulting to float. So maybe declaring array to be a float array works better.
Best regards
Thomas