1

当我使用 Android Studio 调试器调试我的应用程序时,我的 Android 应用程序在这种方法下崩溃了##

不知道如何解决这个问题

private void loadModel() {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    // Add 2 classifier arrayList
                    // the tensorflow classifier and the keras classifier
                    mClassifier.add(TensorFlowClassifier.create(MainActivity.this.getAssets(),
                            "TensorFlow", "opt_mnist_convent-tf.pb", "labels.txt", PIXEL_WIDTH,
                            "input", "output", true));
                    mClassifier.add(TensorFlowClassifier.create(
                            MainActivity.this.getAssets(), "keras", "opt_mnist_convent-keras.pb",
                            "labels.txt", PIXEL_WIDTH, "conv2d_1_input", "dense_2/Softmax", false
                    ));
                } catch (final Exception e) {
                    throw new RuntimeException("Error initializing classifier!", e);
                }
            }
        }).start();
4

0 回答 0