
package com.reactlibrary;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import org.tensorflow.contrib.android.TensorFlowInferenceInterface;

public class RNTensorflowModule extends ReactContextBaseJavaModule {

  private final ReactApplicationContext reactContext;
  private TensorFlowInferenceInterface inference;

  public RNTensorflowModule(ReactApplicationContext reactContext) {
    super(reactContext);
    this.reactContext = reactContext;
  }

  @Override
  public String getName() {
    return "RNTensorflow";
  }

  @ReactMethod
  public void instantiateTensorflow(String modelFilePath) {
    this.inference = new TensorFlowInferenceInterface(reactContext.getAssets(), modelFilePath);
  }
}
@@ -186,16 +186,78 @@
 Method;%0A
+import org.tensorflow.Graph;%0Aimport org.tensorflow.Operation;%0A
 import o
@@ -874,10 +874,757 @@
 th);%0A  %7D
+%0A%0A  @ReactMethod%0A  public void feed(String inputName, double%5B%5D src, long%5B%5D dims) %7B%0A%0A  %7D%0A%0A  @ReactMethod%0A  public void feed(String inputName, double%5B%5D src) %7B%0A%0A  %7D%0A%0A  @ReactMethod%0A  public void run(String%5B%5D outputNames) %7B%0A%0A  %7D%0A%0A  @ReactMethod%0A  public void run(String%5B%5D outputNames, boolean enableStats) %7B%0A%0A  %7D%0A%0A  @ReactMethod%0A  public void fetch(String outputNames) %7B%0A%0A  %7D%0A%0A  @ReactMethod%0A  public Graph graph() %7B%0A    return this.inference.graph();%0A  %7D%0A%0A  @ReactMethod%0A  public Operation graphOperation(String operationName) %7B%0A    return this.inference.graphOperation(operationName);%0A  %7D%0A%0A  @ReactMethod%0A  public String stats() %7B%0A    return this.inference.getStatString();%0A  %7D%0A%0A  @ReactMethod%0A  public void close() %7B%0A    this.inference.close();%0A  %7D
 %0A%7D

Add method stubs