Issue 1:
Please go to Stack Overflow for help and support:

https://stackoverflow.com/questions/tagged/tensorflow

If you open a GitHub issue, here is our policy:

It must be a bug or a feature request.

The form below must be filled out.

It shouldn't be a TensorBoard issue. Those go here.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.

System information

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

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

Generating Tensorflow model: Ubuntu 16.04 LTS (GNU/Linux 4.4.0-91-generic x86_64)

Load Tensorflow model: macOS 10.12 Sierra

TensorFlow installed from (source or binary): TensorFlow is installed from source

TensorFlow version (use command below): TensorFlow version 1.2.0

Python version: Python version 3.5

Bazel version (if compiling from source): Bazel version 0.5.3

CUDA/cuDNN version: None

GPU model and memory: NA

Exact command to reproduce:

Describe the problem

Error happen when call "status = session_t->Create(graph)"

error message:

2017-08-16 13:22:27.692781+0800 CameraExample[6322:2753781] Error adding graph to session: No OpKernel was registered to support Op 'RandomUniform' with these attrs. Registered devices: [CPU], Registered kernels:

Source code / logs

Export models as *.pb file: (In python)

self.saver.save(self.sess, self.my_path_to_model + "model.ckpt", global_step=i)

output_graph_def = tf.graph_util.convert_variables_to_constants(self.sess,self.sess.graph_def,output_node_names=['models_simple/y_conv'])

with tf.gfile.FastGFile(self.my_path_to_model+ 'graph.pb', mode = 'wb') as f:

f.write(output_graph_def.SerializeToString())

IOS:

use the following operations to process exported model

#Call freeze_graph, synthesize graph.pb and CKPT, generate frozen.pb

bazel-bin/tensorflow/python/tools/freeze_graph

--input_graph=XXXX/graph.pb

--input_checkpoint=XXXX/model.ckpt-0

--output_node_names=models_simple/Placeholder,models_simple/y_conv

--input_binary

--output_graph=XXXX/frozen.pb

#Call optimize_for_inference, reduce the operation, replace the calculation can not run in the iOS version, generate inference.pb

bazel-bin/tensorflow/python/tools/optimize_for_inference

--input=XXXX/frozen.pb

--output=XXXX/inference.pb

--input_names=models_simple/Placeholder

--output_names=models_simple/y_conv

--frozen_graph=True

#Call quantize_graph to further optimize the graph, generate rounded_graph.pb

bazel-bin/tensorflow/tools/quantization/quantize_graph

--input=XXXX/inference.pb

--output=XXXX/rounded_graph.pb

--output_node_names=models_simple/y_conv

--mode=weights_rounded

Then, execute the following code, (BOOL)loadGraphFromPath executed successfully, but error raised at "status = session_t->Create(graph)"

(BOOL)loadGraphFromPath:(NSString *)path

{

auto status = ReadBinaryProto(tensorflow::Env::Default(), path.fileSystemRepresentation, &graph);

if (!status.ok()) {

NSLog(@"Error reading graph: %s", status.error_message().c_str());

return NO;

}

// This prints out the names of the nodes in the graph.

auto nodeCount = graph.node_size();

NSLog(@"Node count: %d", nodeCount);

for (auto i = 0; i < nodeCount; ++i) {

auto node = graph.node(i);

NSLog(@"Node %d: %s '%s'", i, node.op().c_str(), node.name().c_str());

}

return YES;

}

create tf session:

(BOOL)createSession

{

tensorflow::SessionOptions options;

auto status = tensorflow::NewSession(options, &session_t);

if (!status.ok()) {

NSLog(@"Error creating session: %s", status.error_message().c_str());

return NO;

}

status = session_t->Create(graph);

if (!status.ok()) {

// error

NSLog(@"Error adding graph to session: %s", status.error_message().c_str());

return NO;

}

return YES;

}

error message:

2017-08-16 13:22:27.692781+0800 CameraExample[6322:2753781] Error adding graph to session: No OpKernel was registered to support Op 'RandomUniform' with these attrs. Registered devices: [CPU], Registered kernels:

[[Node: dropout/random_uniform/RandomUniform = RandomUniform[T=DT_INT32, dtype=DT_FLOAT, seed=87654321, seed2=24](dropout/Shape)]]

It seems that RandomUniform was not supported on iOS , but when I called freeze_graph, those which are not supported on iOS should be deleted. What can I do for this problem?

Issue 2:
Hi!

Im working with the python wrapper for tensorflow. Is there any intentions of implement similar wrappers for the R languages?