Using PyTorch, I have trained a simple multiclass classifier and I want to convert it to CoreML model format. It is converted, but there's an issue.
I've searched quite exhaustively but most frequent questions, pertaining to mlmodel's inputs, are only about how to change the format of the input of mlmodel from MLMultiArray to UIImage because they must be working with images. But if my model expects a UIImage as input whereas I have multiarray type data, how can I change the model's input so it expects multiarray data?
Model input spec I get after conversion:
input {
name: "input"
type {
imageType {
width: 3
height: 150
colorSpace: GRAYSCALE
}
}
}
Model input spec I want to have:
input {
name: "input"
type {
multiArrayType {
shape: 3
shape: 1
shape: 150
dataType: DOUBLE
}
}
}
Any help will be really appreciated. Thanks!