diff options
author | 2018-01-07 03:06:06 -0800 | |
---|---|---|
committer | 2018-01-07 03:09:53 -0800 | |
commit | 334d3c21f3107152c255fb2dd46a7474a7928838 (patch) | |
tree | eebc034813bda11f83e6f34c74e58953c7a71e16 /tensorflow/contrib/slim | |
parent | 673827730a3ae6a86f9cad86d19ec9e7d4597f3a (diff) |
Clarify documentation for squeeze_spatial. Use of squeeze_spatial=True with large images results in an error, either at graph build time (if the input image size is known), or at runtime (if not).
Example error message (for the former case):
ValueError: Can not squeeze dim[1], expected a dimension of 1, got 7 for 'InceptionV3/AuxLogits/SpatialSqueeze' (op: 'Squeeze') with input shapes: [1,7,7,1001].
PiperOrigin-RevId: 181075862
Diffstat (limited to 'tensorflow/contrib/slim')
-rw-r--r-- | tensorflow/contrib/slim/python/slim/nets/inception_v3.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/contrib/slim/python/slim/nets/inception_v3.py b/tensorflow/contrib/slim/python/slim/nets/inception_v3.py index 432e1f79f1..a0e4b36058 100644 --- a/tensorflow/contrib/slim/python/slim/nets/inception_v3.py +++ b/tensorflow/contrib/slim/python/slim/nets/inception_v3.py @@ -548,7 +548,10 @@ def inception_v3(inputs, parameters or computation cost of the model. prediction_fn: a function to get predictions out of logits. spatial_squeeze: if True, logits is of shape is [B, C], if false logits is - of shape [B, 1, 1, C], where B is batch_size and C is number of classes. + of shape [B, 1, 1, C], where B is batch_size and C is number of classes. + To use this parameter, the input images must be smaller + than 300x300 pixels, in which case the output logit layer + does not contain spatial information and can be removed. reuse: whether or not the network and its variables should be reused. To be able to reuse 'scope' must be given. scope: Optional variable_scope. |