Esempio n. 1
0
 def __init__(self,
              num_classes: Optional[int] = None,
              multi_label: bool = False,
              loss: types.LossType = None,
              metrics: Optional[types.MetricsType] = None,
              project_name: str = 'image_classifier',
              max_trials: int = 100,
              directory: Union[str, Path, None] = None,
              objective: str = 'val_loss',
              overwrite: bool = True,
              seed: Optional[int] = None,
              **kwargs):
     super().__init__(outputs=hypermodels.ClassificationHead(
         num_classes=num_classes,
         multi_label=multi_label,
         loss=loss,
         metrics=metrics),
                      max_trials=max_trials,
                      directory=directory,
                      project_name=project_name,
                      objective=objective,
                      tuner=task_specific.ImageClassifierTuner,
                      overwrite=overwrite,
                      seed=seed,
                      **kwargs)
Esempio n. 2
0
 def __init__(self,
              column_names=None,
              column_types=None,
              num_classes=None,
              multi_label=False,
              loss=None,
              metrics=None,
              name='structured_data_classifier',
              max_trials=100,
              directory=None,
              objective='val_accuracy',
              overwrite=True,
              seed=None):
     super().__init__(outputs=hypermodels.ClassificationHead(
         num_classes=num_classes,
         multi_label=multi_label,
         loss=loss,
         metrics=metrics),
                      column_names=column_names,
                      column_types=column_types,
                      max_trials=max_trials,
                      directory=directory,
                      name=name,
                      objective=objective,
                      tuner=greedy.Greedy,
                      overwrite=overwrite,
                      seed=seed)
Esempio n. 3
0
 def __init__(self,
              num_classes=None,
              multi_label=False,
              loss=None,
              metrics=None,
              name='text_classifier',
              max_trials=100,
              directory=None,
              objective='val_loss',
              overwrite=True,
              seed=None):
     super().__init__(
         outputs=hypermodels.ClassificationHead(num_classes=num_classes,
                                                multi_label=multi_label,
                                                loss=loss,
                                                metrics=metrics),
         max_trials=max_trials,
         directory=directory,
         name=name,
         objective=objective,
         tuner=greedy.Greedy,
         overwrite=overwrite,
         seed=seed)
Esempio n. 4
0
 def __init__(self,
              num_classes: Optional[int] = None,
              multi_label: bool = False,
              loss: utils.AcceptableLoss = None,
              metrics: utils.AcceptableMetrics = None,
              name: str = 'text_classifier',
              max_trials: int = 100,
              directory: Union[str, pathlib.Path, None] = None,
              objective: str = 'val_loss',
              overwrite: bool = True,
              seed: Optional[int] = None):
     super().__init__(outputs=hypermodels.ClassificationHead(
         num_classes=num_classes,
         multi_label=multi_label,
         loss=loss,
         metrics=metrics),
                      max_trials=max_trials,
                      directory=directory,
                      name=name,
                      objective=objective,
                      tuner=task_specific.TextClassifierTuner,
                      overwrite=overwrite,
                      seed=seed)
Esempio n. 5
0
 def __init__(self,
              num_classes: Optional[int] = None,
              multi_label: bool = False,
              loss: Union[str, Callable, None] = None,
              metrics: Optional[List[Union[str, Callable]]] = None,
              name: str = 'image_classifier',
              max_trials: int = 100,
              directory: Optional[str] = None,
              objective: str = 'val_loss',
              overwrite: bool = True,
              seed: Optional[int] = None):
     super().__init__(outputs=hypermodels.ClassificationHead(
         num_classes=num_classes,
         multi_label=multi_label,
         loss=loss,
         metrics=metrics),
                      max_trials=max_trials,
                      directory=directory,
                      name=name,
                      objective=objective,
                      tuner=task_specific.ImageClassifierTuner,
                      overwrite=overwrite,
                      seed=seed)