Issue 1:
i predict image with python api

only need 15ms,

but with the same model,java api need 500+ms

Issue 2:
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

//create session, this pb come from python
ConfigProto config=ConfigProto.newBuilder()
.setAllowSoftPlacement(true)
.setLogDevicePlacement(false)
.clearLogDevicePlacement()
//.setGpuOptions(GPUOptions.newBuilder().setAllowGrowth(true))
//.setInterOpParallelismThreads(1)
.build();
sess=new Session( graph, config.toByteArray() );

AnjosLog log=new AnjosLog();
log.begin();
log.begin2Series("create data");
float[][][] X=new float[1][this.audio_len][this.audio_feat_len];
X[0]=data;
log.stop2Series();
log.begin2Series("create tensor");
Tensor x= Tensor.create(X);
log.stop2Series();
log.begin2Series("use model");
Tensor y = sess.runner().feed(input_var, x).fetch(label_var).run().get(0);
log.stop2Series();
log.begin2Series("take result");
float[][][] result = new float[ (int)y.shape()[0] ][ (int)y.shape()[1] ][ (int)y.shape()[2] ];
y.copyTo(result);
log.stop2Series();
log.stop();

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): win7 CPU

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):

TensorFlow version (use command below):1.8.0 java

Python version: 3.5.6

Bazel version (if compiling from source): none

GCC/Compiler version (if compiling from source): none

CUDA/cuDNN version: none

GPU model and memory: none

You can collect some of this information using our environment capture script

You can also obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the current behavior

I use python3.5 predict the same one sample speed:

series start　　　　　　　　　　　　　　　　 2019-04-20 13:06:18
series end　　　　　　　　　　　　　　　　 2019-04-20 13:06:18
total time　　　　　　　　　　　　　　　　 0.24s 0.00min 2019-04-20 13:06:18

I use java1.8 predict the same one sample speed:

start time　　　　　　　　　　　　　　　　2019-04-20 12:57:43 924
series start　　　　　　　　　　　　　　　　 create data 2019-04-20 12:57:43 925
series end　　　　　　　　　　　　　　　　 0.00s 0.00min
series start　　　　　　　　　　　　　　　　 create tensor 2019-04-20 12:57:43 927
series end　　　　　　　　　　　　　　　　 0.09s 0.00min
series start　　　　　　　　　　　　　　　　 use model 2019-04-20 12:57:44 015
series end　　　　　　　　　　　　　　　　 0.69s 0.01min
series start　　　　　　　　　　　　　　　　 take result 2019-04-20 12:57:44 710
series end　　　　　　　　　　　　　　　　 0.03s 0.00min
end time　　　　　　　　　　　　　　　　 2019-04-20 12:57:44 738
total time　　　　　　　　　　　　　　　　 0.81s 0.01min

Describe the expected behavior

I understand that java should be faster than Python. But not like this.

Code to reproduce the issue

Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.