Problem in Pytorch implementation in Android

I needed some guidance regarding pytorch implementation in android. I am unable to figure out that how can we extract value from the iValue array. I tried using .toStr() and .toDouble() functions of iValue but it’s giving the error “java.lang.IllegalStateException: Expected IValue type 5, actual type 2” (in case of .toDouble()) and "java.lang.IllegalStateException: Expected IValue type 6, actual type 2: (incase of .toStr()). We are getting the IValue[] by using following piece of code
IValue[] outputTensor=module.forward(IValue.from(inputTensor)).toTuple()
We have also tried to replace .toTuple() in the above mentioned code to toTensor() but our issue is not getting resolved!