Using the GAN models in iOS

If you try to use the TensorFlow pod in your iOS app and load the gan_mnist.pb file, you'll get an error:

Could not create TensorFlow Graph: Invalid argument: No OpKernel was registered to support Op 'RandomStandardNormal' with these attrs. Registered devices: [CPU], Registered kernels: <no registered kernels>[[Node: z_1/RandomStandardNormal = RandomStandardNormal[T=DT_INT32, _output_shapes=[[50,100]], dtype=DT_FLOAT, seed=0, seed2=0](z_1/shape)]]

Make sure your tensorflow/contrib/makefile/tf_op_files.txt file has tensorflow/core/kernels/random_op.cc, which implements the RandomStandardNormal operation, and the libtensorflow-core.a is built with tensorflow/contrib/makefile/build_all_ios.sh after the line is added ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.