You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this branch https://github.com/redis-developer/redisai-iris/pull/1 I have an updated example of creating a SciKit model, train it, and converting it into a Pytorch's TorchScript model using MS Hummingbird.ml.
Here's an example of the converted Torch model working in RedisAI via the CLI:
$ redis-cli -x AI.MODELSTORE iris TORCH CPU BLOB < iris.pt
I get the following ClassCastException from the ai.setTensor("iris:in", new double[] {5.0, 3.4, 1.6, 0.4, 6.0, 2.2, 5.0, 1.5}, new int[]{2, 4}); line:
java.lang.ClassCastException: class java.lang.Double cannot be cast to class [D (java.lang.Double and [D are in module java.base of loader 'bootstrap')
at com.redislabs.redisai.DataType$4.toByteArray(DataType.java:75)
at com.redislabs.redisai.DataType.toByteArray(DataType.java:151)
at com.redislabs.redisai.DataType.toByteArray(DataType.java:148)
at com.redislabs.redisai.DataType.toByteArray(DataType.java:165)
at com.redislabs.redisai.Tensor.tensorSetFlatArgs(Tensor.java:111)
at com.redislabs.redisai.RedisAI.setTensor(RedisAI.java:126)
at com.redislabs.redisai.RedisAI.setTensor(RedisAI.java:114)
at com.redislabs.spring.ai.AIOperationsImpl.setTensor(AIOperationsImpl.java:24)
at com.redislabs.spring.OpsForAITest.testTorchScriptModelRun(OpsForAITest.java:57)
...
Any hints on how to write this particular input Tensor would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
In this branch
https://github.com/redis-developer/redisai-iris/pull/1
I have an updated example of creating a SciKit model, train it, and converting it into a Pytorch's TorchScript model using MS Hummingbird.ml.Here's an example of the converted Torch model working in RedisAI via the CLI:
In JRedisAI I am trying the following:
I get the following
ClassCastException
from theai.setTensor("iris:in", new double[] {5.0, 3.4, 1.6, 0.4, 6.0, 2.2, 5.0, 1.5}, new int[]{2, 4});
line:Any hints on how to write this particular input Tensor would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: