diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-09-28 11:53:24 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-28 12:05:15 -0700 |
commit | f0c832dabc2531e56004a0d909fdb6437777e9c4 (patch) | |
tree | fb167b3647a9b2030173387831b94eece9a59fdd /tensorflow/contrib/saved_model | |
parent | 996b0342879af43de1bf4071190b90ff7309428a (diff) |
Adds tf.contrib.nn.scaled_softplus(x, alpha) = alpha * softplus(x/alpha). This can be thought of as a smoothed version of a ReLU. On Imagenet, alpha=0.3 gives 0.6-1% improvement in validation accuracy compared to ReLU, by reducing the generalization gap.
PiperOrigin-RevId: 170376244
Diffstat (limited to 'tensorflow/contrib/saved_model')
-rw-r--r-- | tensorflow/contrib/saved_model/python/saved_model/signature_def_utils_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils_test.py b/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils_test.py index d2e14f73e4..282dd7dc3b 100644 --- a/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils_test.py +++ b/tensorflow/contrib/saved_model/python/saved_model/signature_def_utils_test.py @@ -94,7 +94,7 @@ class SignatureDefUtilsTest(test.TestCase): def testGetSignatureDefByKeyRegression(self): input1 = constant_op.constant("a", name="input-1") - output1 = constant_op.constant(7.2, name="output-1") + output1 = constant_op.constant("b", name="output-1") meta_graph_def = meta_graph_pb2.MetaGraphDef() self._add_to_signature_def_map(meta_graph_def, { @@ -123,7 +123,7 @@ class SignatureDefUtilsTest(test.TestCase): def testGetSignatureDefByKeyClassification(self): input1 = constant_op.constant("a", name="input-1") output1 = constant_op.constant("b", name="output-1") - output2 = constant_op.constant(3.0, name="output-2") + output2 = constant_op.constant("c", name="output-2") meta_graph_def = meta_graph_pb2.MetaGraphDef() self._add_to_signature_def_map(meta_graph_def, { |