Closed AbhishekBose closed 1 year ago
Can you print out the class name of resultMap.get("resized_img")
before you cast it to NDArray?
It looks like your resultMap.get("resized_img")
returns scala.Some
, should you call resultMap.get("resized_img").get()
before cast?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Hello Team, As seen in the picture below
I have the variable called
resultMap
which contains a key calledresized_img
with the value being a resized NDArray. Now in myprocessInput
I am trying to take this array and put in an NDList for the inference to happen, in this mannerBut I am constantly getting the following error
java.lang.ClassCastException: scala.Some cannot be cast to ai.djl.ndarray.NDArray
And If I don't put an explicit
asInstanceOf
thenew NDList()
call doesn't except the value.How do you recommend we do this?
The idea is to always have a map containing
String, [Different types]
and then create the NDList dynamically before moving in for the inference.@frankfliu Please help