Skip to content

Instantly share code, notes, and snippets.

@thepulkitagarwal
thepulkitagarwal / Install NVIDIA Driver and CUDA.md
Created February 24, 2018 10:24 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
import org.tensorflow.contrib.android.TensorFlowInferenceInterface;
/** One time initialization: */
TensorFlowInferenceInterface tensorflow = new TensorFlowInferenceInterface(getAssets(), "file:///android_asset/model.pb");
/** Continuous inference (floats used in example, can be any primitive): */
// loading new input
tensorflow.feed("input:0", input, INPUT_SHAPE); // INPUT_SHAPE is an long[] of expected shape, input is a float[] with the input data