<p dir="auto">env: macOS<br>
tf version: master brunch</p>
<p dir="auto">I built tensorflow on <code class="notranslate">macOS</code> using <code class="notranslate">build_all_ios.sh</code>. Then I tried to load <code class="notranslate">frozen.pb</code> data created by python program. Here is a code to load graph in <code class="notranslate">iOS</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    Status status;
    Session *session;
    
    status = NewSession(SessionOptions(), &amp;session);
    if (!status.ok()) {
        return NO;
    }
    
    GraphDef graph;
    NSString *modelPath = [[NSBundle bundleForClass:[self class]] pathForResource:@&quot;frozen&quot; ofType:@&quot;pb&quot;];
    status = ReadBinaryProto(Env::Default(), modelPath.fileSystemRepresentation, &amp;graph);
    if (!status.ok()) {
        return NO;
    }
    
    status = session-&gt;Create(graph);
    if (!status.ok()) {
        std::cout &lt;&lt; status.ToString() &lt;&lt; &quot;\n&quot;;
        return NO;
    }"><pre class="notranslate"><code class="notranslate">    Status status;
    Session *session;
    
    status = NewSession(SessionOptions(), &amp;session);
    if (!status.ok()) {
        return NO;
    }
    
    GraphDef graph;
    NSString *modelPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"frozen" ofType:@"pb"];
    status = ReadBinaryProto(Env::Default(), modelPath.fileSystemRepresentation, &amp;graph);
    if (!status.ok()) {
        return NO;
    }
    
    status = session-&gt;Create(graph);
    if (!status.ok()) {
        std::cout &lt;&lt; status.ToString() &lt;&lt; "\n";
        return NO;
    }
</code></pre></div>
<p dir="auto">First thing is with default build settings <code class="notranslate">libtensorflow-core.a</code> is extremely large - more then 400 MB that is not applicable for using in mobile devices. In any case while loading <code class="notranslate">graph</code> I got and error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid argument: No OpKernel was registered to support Op 'Less' with these attrs.  Registered devices: [CPU], Registered kernels:
     device='CPU'; T in [DT_FLOAT]
     
     [[Node: GRU-RNN/rnn/while/Less = Less[T=DT_INT32](GRU-RNN/rnn/while/Merge, GRU-RNN/rnn/while/Less/Enter)]]"><pre class="notranslate"><code class="notranslate">Invalid argument: No OpKernel was registered to support Op 'Less' with these attrs.  Registered devices: [CPU], Registered kernels:
     device='CPU'; T in [DT_FLOAT]
     
     [[Node: GRU-RNN/rnn/while/Less = Less[T=DT_INT32](GRU-RNN/rnn/while/Merge, GRU-RNN/rnn/while/Less/Enter)]]
</code></pre></div>
<p dir="auto">I could not find how to solve it except manually change next files:</p>
<ol dir="auto">
<li>added next code to <code class="notranslate">cwise_op_less.cc</code></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#if defined(__ANDROID_TYPES_SLIM__)
// We only register the first type when we have multi-argument calls in the
// case where we're trying to reduce executable size, but it turns out that the
// int32 version of this op is needed, so explicitly include it.
REGISTER(BinaryOp, CPU, &quot;Less&quot;, functor::less, int32);
#endif  // __ANDROID_TYPES_SLIM__"><pre class="notranslate"><code class="notranslate">#if defined(__ANDROID_TYPES_SLIM__)
// We only register the first type when we have multi-argument calls in the
// case where we're trying to reduce executable size, but it turns out that the
// int32 version of this op is needed, so explicitly include it.
REGISTER(BinaryOp, CPU, "Less", functor::less, int32);
#endif  // __ANDROID_TYPES_SLIM__
</code></pre></div>
<ol start="2" dir="auto">
<li>added next code to <code class="notranslate">cwise_op_add_2.cc</code></li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#if defined(__ANDROID_TYPES_SLIM__)
    // We only register the first type when we have multi-argument calls in the
    // case where we're trying to reduce executable size, but it turns out that the
    // int32 version of this op is needed, so explicitly include it.
    REGISTER(BinaryOp, CPU, &quot;Add&quot;, functor::add, int32);
#endif  // __ANDROID_TYPES_SLIM__"><pre class="notranslate"><code class="notranslate">#if defined(__ANDROID_TYPES_SLIM__)
    // We only register the first type when we have multi-argument calls in the
    // case where we're trying to reduce executable size, but it turns out that the
    // int32 version of this op is needed, so explicitly include it.
    REGISTER(BinaryOp, CPU, "Add", functor::add, int32);
#endif  // __ANDROID_TYPES_SLIM__
</code></pre></div>
<p dir="auto">The second change was added because of the same error but for <code class="notranslate">Add</code> operation.</p>
<p dir="auto">Then, I have got another error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid argument: No OpKernel was registered to support Op 'GatherNd' with these attrs.  Registered devices: [CPU], Registered kernels:
  &lt;no registered kernels&gt;

	 [[Node: GatherNd = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT](GRU-RNN/rnn/transpose, stack)]]"><pre class="notranslate"><code class="notranslate">Invalid argument: No OpKernel was registered to support Op 'GatherNd' with these attrs.  Registered devices: [CPU], Registered kernels:
  &lt;no registered kernels&gt;

	 [[Node: GatherNd = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT](GRU-RNN/rnn/transpose, stack)]]
</code></pre></div>
<p dir="auto">I think this is because python script contains <code class="notranslate">tf.gather_nd</code> function. I found that <code class="notranslate">tf_op_files.txt</code> does not contain any <code class="notranslate">gather*</code> functions, so I tried to add them manually but I don't know that exactly should I add and where. Can you please provide some information about that and probably add some issues about <code class="notranslate">Less</code> and <code class="notranslate">Add</code> operations for <code class="notranslate">Int32</code> type?</p>
<p dir="auto">I am trying to load the simple trained model, but I am facing the following issue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No OpKernel was registered to support Op 'RandomShuffleQueue' with these attrs

[[Node: shuffle_batch_1/random_shuffle_queue = RandomShuffleQueue[capacity=1003, 
component_types=[DT_FLOAT, DT_FLOAT, DT_FLOAT], container=&quot;&quot;, min_after_dequeue=1000,
seed=0, seed2=0, shapes=[[227,227,3], [10], [18]], shared_name=&quot;&quot;]()]]"><pre class="notranslate"><code class="notranslate">No OpKernel was registered to support Op 'RandomShuffleQueue' with these attrs

[[Node: shuffle_batch_1/random_shuffle_queue = RandomShuffleQueue[capacity=1003, 
component_types=[DT_FLOAT, DT_FLOAT, DT_FLOAT], container="", min_after_dequeue=1000,
seed=0, seed2=0, shapes=[[227,227,3], [10], [18]], shared_name=""]()]]
</code></pre></div>
<p dir="auto">Thanks,</p>