Skip to content

Instantly share code, notes, and snippets.

@sergei-mironov
Created November 28, 2019 10:46
Show Gist options
  • Save sergei-mironov/e0dab4bd57bbfc4be025902789370dac to your computer and use it in GitHub Desktop.
Save sergei-mironov/e0dab4bd57bbfc4be025902789370dac to your computer and use it in GitHub Desktop.
demo_subcl.py
class MyModel(keras.Model):
def __init__(self, **kwargs):
super(MyModel, self).__init__(**kwargs)
self.dense_1 = layers.Dense(64, activation='relu')
self.dense_2 = layers.Dense(10)
def call(self, inputs):
return self.dense_2(self.dense_1(inputs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment