akirasosa / mobile-semantic-segmentation

Real-Time Semantic Segmentation in Mobile device
MIT License
715 stars 135 forks source link

CoreML model crashes in real device. #1

Closed akirasosa closed 7 years ago

akirasosa commented 7 years ago

It generates non-trained CoreML model.

python coreml-converter-bench.py

If I run the generated model in iOS simulator, it works. But if I run it in real device, it crashes.

I use following Swift unit test code to run it.

    func testConvExample() {
        guard let input_data = try? MLMultiArray(shape:[3, 128, 128], dataType:MLMultiArrayDataType.float32) else {
            fatalError("Unexpected runtime error. MLMultiArray")
        }
        let model = mu_128_1_025()
        do {
            try model.prediction(data: input_data)
            print("predicted------------")
        } catch  {
            print("error------------")
        }
    }
akirasosa commented 7 years ago

Resolved by https://github.com/akirasosa/mobile-semantic-segmentation/pull/2 .