| 1511 | |
| 1512 | |
| 1513 | class MyAddLayer(keras.layers.Layer): |
| 1514 | |
| 1515 | def __init__(self, increment, **kwargs): |
| 1516 | super(MyAddLayer, self).__init__(**kwargs) |
| 1517 | self._increment = increment |
| 1518 | |
| 1519 | def call(self, inputs): |
| 1520 | return inputs + self._increment |
| 1521 | |
| 1522 | def get_config(self): |
| 1523 | config = super(MyAddLayer, self).get_config() |
| 1524 | config['increment'] = self._increment |
| 1525 | return config |
| 1526 | |
| 1527 | |
| 1528 | class FromKerasFile(TestModels, parameterized.TestCase): |
no outgoing calls