pytorch / android-demo-app

PyTorch android examples of usage in applications
1.45k stars 593 forks source link

Getting a garbage value tostr() #317

Open areebbashir opened 1 year ago

areebbashir commented 1 year ago

I trained an NMTmodel which takes string as input and returns string as output. My models returns Tensor and a string in its output. When I convert the iValue to string using toStr() i get garbage values instead of the string. final IValue [] output=module.forward(IValue.from(word)).toTuple(); String pred= output[1].toStr()

Please help me with this issue

NeighborhoodCoding commented 11 months ago

You can't do toSTR() in JAVA, can you? That feature is only supported in Python.