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

Method __init__

tensorflow/python/keras/testing_utils.py:388–392  ·  view source on GitHub ↗
(self, num_hidden, num_classes)

Source from the content-addressed store, hash-verified

386 """A subclass model based small MLP."""
387
388 def __init__(self, num_hidden, num_classes):
389 super(_SmallSubclassMLP, self).__init__()
390 self.layer_a = keras.layers.Dense(num_hidden, activation='relu')
391 activation = 'sigmoid' if num_classes == 1 else 'softmax'
392 self.layer_b = keras.layers.Dense(num_classes, activation=activation)
393
394 def call(self, inputs, **kwargs):
395 x = self.layer_a(inputs)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected