more lint
This commit is contained in:
parent
32c76e588a
commit
ed93cf6f44
4 changed files with 113 additions and 108 deletions
|
@ -228,7 +228,9 @@ class Bolton(optimizer_v2.OptimizerV2):
|
|||
return self._internal_optimizer.from_config(*args, **kwargs)
|
||||
|
||||
def __getattr__(self, name):
|
||||
"""return _internal_optimizer off self instance, and everything else
|
||||
"""Get attr.
|
||||
|
||||
return _internal_optimizer off self instance, and everything else
|
||||
from the _internal_optimizer instance.
|
||||
|
||||
Args:
|
||||
|
@ -253,6 +255,7 @@ class Bolton(optimizer_v2.OptimizerV2):
|
|||
|
||||
def __setattr__(self, key, value):
|
||||
""" Set attribute to self instance if its the internal optimizer.
|
||||
|
||||
Reroute everything else to the _internal_optimizer.
|
||||
|
||||
Args:
|
||||
|
@ -318,6 +321,7 @@ class Bolton(optimizer_v2.OptimizerV2):
|
|||
batch_size
|
||||
):
|
||||
"""Accepts required values for bolton method from context entry point.
|
||||
|
||||
Stores them on the optimizer for use throughout fitting.
|
||||
|
||||
Args:
|
||||
|
@ -327,7 +331,7 @@ class Bolton(optimizer_v2.OptimizerV2):
|
|||
layers: list of Keras/Tensorflow layers. Can be found as model.layers
|
||||
class_weights: class_weights used, which may either be a scalar or 1D
|
||||
tensor with dim == n_classes.
|
||||
n_samples number of rows/individual samples in the training set
|
||||
n_samples: number of rows/individual samples in the training set
|
||||
batch_size: batch size used.
|
||||
"""
|
||||
if epsilon <= 0:
|
||||
|
|
|
@ -558,6 +558,7 @@ class SchedulerTest(keras_parameterized.TestCase):
|
|||
])
|
||||
def test_call(self, step, res):
|
||||
"""Test call.
|
||||
|
||||
Test that attribute of internal optimizer is correctly rerouted to the
|
||||
internal optimizer
|
||||
|
||||
|
|
Loading…
Reference in a new issue