MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testActivation

Method testActivation

tensorflow/python/layers/core_test.py:171–182  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169
170 @test_util.run_in_graph_and_eager_modes
171 def testActivation(self):
172 dense = core_layers.Dense(2, activation=nn_ops.relu, name='dense1')
173 inputs = random_ops.random_uniform((5, 3), seed=1)
174 outputs = dense(inputs)
175 if not context.executing_eagerly():
176 self.assertEqual(outputs.op.name, 'dense1/Relu')
177
178 dense = core_layers.Dense(2, name='dense2')
179 inputs = random_ops.random_uniform((5, 3), seed=1)
180 outputs = dense(inputs)
181 if not context.executing_eagerly():
182 self.assertEqual(outputs.op.name, 'dense2/BiasAdd')
183
184 @test_util.run_deprecated_v1
185 def testActivityRegularizer(self):

Callers

nothing calls this directly

Calls 3

denseFunction · 0.85
random_uniformMethod · 0.80
executing_eagerlyMethod · 0.80

Tested by

no test coverage detected