conflicts in models
This commit is contained in:
parent
034ae8fea4
commit
33c3f058ac
1 changed files with 7 additions and 51 deletions
|
@ -81,24 +81,12 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
"""See super class. Default optimizer used in Bolton method is SGD.
|
||||
|
||||
Args:
|
||||
<<<<<<< HEAD
|
||||
optimizer:
|
||||
loss:
|
||||
metrics:
|
||||
loss_weights:
|
||||
sample_weight_mode:
|
||||
weighted_metrics:
|
||||
target_tensors:
|
||||
distribute:
|
||||
kernel_initializer:
|
||||
=======
|
||||
optimizer: The optimizer to use. This will be automatically wrapped
|
||||
with the Bolton Optimizer.
|
||||
loss: The loss function to use. Must be a StrongConvex loss (extend the
|
||||
StrongConvexMixin).
|
||||
kernel_initializer: The kernel initializer to use for the single layer.
|
||||
kwargs: kwargs to keras Model.compile. See super.
|
||||
>>>>>>> 71c4a11eb9ad66a78fb13428987366887ea20beb
|
||||
"""
|
||||
if not isinstance(loss, StrongConvexMixin):
|
||||
raise ValueError('loss function must be a Strongly Convex and therefore '
|
||||
|
@ -137,25 +125,17 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
4. Use a strongly convex loss function (see compile)
|
||||
See super implementation for more details.
|
||||
|
||||
<<<<<<< HEAD
|
||||
Args:
|
||||
n_samples: the number of individual samples in x.
|
||||
epsilon: privacy parameter, which trades off between utility an privacy.
|
||||
See the bolton paper for more description.
|
||||
noise_distribution: the distribution to pull noise from.
|
||||
class_weight: the class weights to be used. Can be a scalar or 1D tensor
|
||||
whose dim == n_classes.
|
||||
=======
|
||||
Args:
|
||||
x:
|
||||
y:
|
||||
batch_size:
|
||||
class_weight: the class weights to be used. Can be a scalar or 1D tensor
|
||||
whose dim == n_classes.
|
||||
n_samples: the number of individual samples in x.
|
||||
epsilon: privacy parameter, which trades off between utility an privacy.
|
||||
See the bolton paper for more description.
|
||||
noise_distribution: the distribution to pull noise from.
|
||||
class_weight: the class weights to be used. Can be a scalar or 1D tensor
|
||||
whose dim == n_classes.
|
||||
>>>>>>> 71c4a11eb9ad66a78fb13428987366887ea20beb
|
||||
|
||||
See the super method for descriptions on the rest of the arguments.
|
||||
steps_per_epoch:
|
||||
"""
|
||||
if class_weight is None:
|
||||
class_weight_ = self.calculate_class_weights(class_weight)
|
||||
|
@ -206,8 +186,7 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
|
||||
This method is the same as fit except for when the passed dataset
|
||||
is a generator. See super method and fit for more details.
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
Args:
|
||||
generator:
|
||||
class_weight: the class weights to be used. Can be a scalar or 1D tensor
|
||||
|
@ -217,18 +196,6 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
Bolton paper for more description.
|
||||
n_samples: number of individual samples in x
|
||||
steps_per_epoch:
|
||||
=======
|
||||
|
||||
Args:
|
||||
n_samples: number of individual samples in x
|
||||
noise_distribution: the distribution to get noise from.
|
||||
epsilon: privacy parameter, which trades off utility and privacy. See
|
||||
Bolton paper for more description.
|
||||
class_weight: the class weights to be used. Can be a scalar or 1D tensor
|
||||
whose dim == n_classes.
|
||||
|
||||
See the super method for descriptions on the rest of the arguments.
|
||||
>>>>>>> 71c4a11eb9ad66a78fb13428987366887ea20beb
|
||||
"""
|
||||
if class_weight is None:
|
||||
class_weight = self.calculate_class_weights(class_weight)
|
||||
|
@ -262,7 +229,6 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
num_classes=None):
|
||||
"""Calculates class weighting to be used in training.
|
||||
|
||||
<<<<<<< HEAD
|
||||
Args:
|
||||
class_weights: str specifying type, array giving weights, or None.
|
||||
class_counts: If class_weights is not None, then an array of
|
||||
|
@ -271,16 +237,6 @@ class BoltonModel(Model): # pylint: disable=abstract-method
|
|||
classes.
|
||||
Returns:
|
||||
class_weights as 1D tensor, to be passed to model's fit method.
|
||||
=======
|
||||
Args:
|
||||
class_weights: str specifying type, array giving weights, or None.
|
||||
class_counts: If class_weights is not None, then an array of
|
||||
the number of samples for each class
|
||||
num_classes: If class_weights is not None, then the number of
|
||||
classes.
|
||||
Returns:
|
||||
class_weights as 1D tensor, to be passed to model's fit method.
|
||||
>>>>>>> 71c4a11eb9ad66a78fb13428987366887ea20beb
|
||||
"""
|
||||
# Value checking
|
||||
class_keys = ['balanced']
|
||||
|
|
Loading…
Reference in a new issue