diff options
Diffstat (limited to 'tensorflow/contrib/layers/python/layers/layers.py')
-rw-r--r-- | tensorflow/contrib/layers/python/layers/layers.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tensorflow/contrib/layers/python/layers/layers.py b/tensorflow/contrib/layers/python/layers/layers.py index e13280e7df..cf0df3f095 100644 --- a/tensorflow/contrib/layers/python/layers/layers.py +++ b/tensorflow/contrib/layers/python/layers/layers.py @@ -171,7 +171,10 @@ def _fused_batch_norm( `batch_size`. The normalization is over all but the last dimension if `data_format` is `NHWC` and the second dimension if `data_format` is `NCHW`. - decay: decay for the moving average. + decay: decay for the moving average. Reasonable values for `decay` are close + to 1.0, typically in the multiple-nines range: 0.999, 0.99, 0.9, etc. Lower + `decay` value (recommend trying `decay`=0.9) if model experiences reasonably + good training performance but poor validation and/or test performance. center: If True, subtract `beta`. If False, `beta` is ignored. scale: If True, multiply by `gamma`. If False, `gamma` is not used. When the next layer is linear (also e.g. `nn.relu`), this can be @@ -396,7 +399,10 @@ def batch_norm( `batch_size`. The normalization is over all but the last dimension if `data_format` is `NHWC` and the second dimension if `data_format` is `NCHW`. - decay: decay for the moving average. + decay: decay for the moving average. Reasonable values for `decay` are close + to 1.0, typically in the multiple-nines range: 0.999, 0.99, 0.9, etc. Lower + `decay` value (recommend trying `decay`=0.9) if model experiences reasonably + good training performance but poor validation and/or test performance. center: If True, subtract `beta`. If False, `beta` is ignored. scale: If True, multiply by `gamma`. If False, `gamma` is not used. When the next layer is linear (also e.g. `nn.relu`), this can be @@ -1369,7 +1375,7 @@ def fully_connected(inputs, Raises: ValueError: if x has rank less than 2 or if its last dimension is not set. """ - if not (isinstance(num_outputs, int) or isinstance(num_outputs, long)): + if not (isinstance(num_outputs, six.integer_types)): raise ValueError('num_outputs should be int or long, got %s.', num_outputs) layer_variable_getter = _build_variable_getter({'bias': 'biases'}) |