Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created January 30, 2019 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/45c11274faa3ee88af7e1d3d7dc893e5 to your computer and use it in GitHub Desktop.
Save frogermcs/45c11274faa3ee88af7e1d3d7dc893e5 to your computer and use it in GitHub Desktop.
public class MnistModelConfig {
public static String MODEL_FILENAME = "mnist_model.tflite";
public static final int INPUT_IMG_SIZE_WIDTH = 28;
public static final int INPUT_IMG_SIZE_HEIGHT = 28;
public static final int FLOAT_TYPE_SIZE = 4;
public static final int PIXEL_SIZE = 1;
public static final int MODEL_INPUT_SIZE = FLOAT_TYPE_SIZE * INPUT_IMG_SIZE_WIDTH * INPUT_IMG_SIZE_HEIGHT * PIXEL_SIZE;
public static final List<String> OUTPUT_LABELS = Collections.unmodifiableList(
Arrays.asList("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"));
public static final int MAX_CLASSIFICATION_RESULTS = 3;
public static final float CLASSIFICATION_THRESHOLD = 0.1f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment