Issue 1:
It appears that only some of the image ops (e.g. tf.image.random_saturation()) only accept single images (rank-3 tensors), while others allow batches of images (rank-4 tensors). Should this be made more consistent so that all image ops allow for higher-rank tensors? There doesn't seem to be much about this in the API documentation (some ops just say that the last dimension needs to be 3).

System Information

Have I written custom code?: Yes

OS Platform and Distribution: Ubuntu 16

TensorFlow installed from (source or binary)?: binary

TensorFlow version: 1.0.1

Bazel version (if compiling from source): N/A

CUDA/cuDNN version: N/A

GPU Model and Memory: N/A

Exact command to reproduce:

import tensorflow as tf
images = tf.placeholder(tf.float32, shape=(None, None, None, 3), name='images')
# This is OK
x = tf.image.random_contrast(images, lower=0.5, upper=1.0)
# Throws an exception because `images` is rank-4
x = tf.image.random_saturation(images, lower=0.5, upper=1.0)

Issue 2:
System information

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

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

TensorFlow installed from (source or binary): pip

TensorFlow version (use command below): 1.9

Python version: 3.5.1-32 bit

Bazel version (if compiling from source): 0.15.0

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version: nothing since i have AMD radeon

GPU model and memory:

Exact command to reproduce:

bazel run -c opt tensorflow/contrib/lite/toco:toco -- --savedmodel_directory=C:\Users\LENOVO-PC\DIZIZIT\saved_model -- output_file=C:\Users\LENOVO-PC\DIZIZIT\saved_model\maonani.tflite

Describe the problem

Im trying to convert my saved_model.pb from object detection api file to tensorflow lite but it gives me error such as

ERROR: C:/users/lenovo-pc/tensorflow/tensorflow/contrib/lite/kernels/BUILD:63:1: C++ compilation of rule '//tensorflow/contrib/lite/kernels:gemm_support' failed (Exit 2)
.\tensorflow/contrib/lite/context.h(183): error C2144: syntax error: 'float' should be preceded by ';'
.\tensorflow/contrib/lite/context.h(183): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Target //tensorflow/contrib/lite/toco:toco failed to build

I tried reinstalling all the pre req of tensorflow and use the code again and it gave different error saying

ERROR: C:/users/lenovo-pc/tensorflow/tensorflow/contrib/lite/kernels/BUILD:41:1: C++ compilation of rule '//tensorflow/contrib/lite/kernels:eigen_support' failed (Exit 2)
cl : Command line error D8021 : invalid numeric argument '/Wno-error=reorder'
Target //tensorflow/contrib/lite/toco:toco failed to build

for the 3rd attempt it gives me error saying:

ERROR: C:/users/lenovo-pc/tensorflow/tensorflow/contrib/lite/profiling/BUILD:37:1: C++ compilation of rule '//tensorflow/contrib/lite/profiling:time' failed (Exit 2)
tensorflow/contrib/lite/profiling/time.cc(17): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
Target //tensorflow/contrib/lite/toco:toco failed to build
Use --verbose_failures to see the command lines of failed build steps.

Source code / logs

C:\Users\LENOVO-PC\tensorflow>bazel run -c opt tensorflow/contrib/lite/toco:toco -- --savedmodel_directory=C:\Users\LENOVO-PC\DIZIZIT\saved_model -- output_file=C:\Users\LENOVO-PC\DIZIZIT\saved_model\maonani.tflite

INFO: Build options have changed, discarding analysis cache.

INFO: Analysed target //tensorflow/contrib/lite/toco:toco (1 packages loaded).

INFO: Found 1 target...

ERROR: C:/users/lenovo-pc/tensorflow/tensorflow/contrib/lite/kernels/BUILD:63:1: C++ compilation of rule '//tensorflow/contrib/lite/kernels:gemm_support' failed (Exit 2)

.\tensorflow/contrib/lite/context.h(183): error C2144: syntax error: 'float' should be preceded by ';'

.\tensorflow/contrib/lite/context.h(183): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Target //tensorflow/contrib/lite/toco:toco failed to build

Use --verbose_failures to see the command lines of failed build steps.

INFO: Elapsed time: 6.715s, Critical Path: 1.81s

INFO: 1 process: 1 local.

FAILED: Build did NOT complete successfully

FAILED: Build did NOT complete successfully

2nd attempt was too long to post here