def __init__(self, training_name, data_path, training_results_path):
        super().__init__(training_name, data_path, training_results_path)
        # Config of the data
        self.data_dataset = FashionMNISTDataset

        # Config of the model
        self.model_model = ImageClassifierSimple

        # Config for training
        self.training_loss = SparseCrossEntropyLossFromLogits
        self.training_optimizer = smart_optimizer(SGD)
        self.training_trainer = SupervisedTrainer
        self.training_epochs = 10
        self.training_batch_size = 32
Esempio n. 2
0
    def __init__(self, training_name, data_path, training_results_path):
        super().__init__(training_name, data_path, training_results_path)
        # Config of the data
        self.data_dataset = FashionMNISTDataset

        # Config of the model
        self.model_model = lambda config: Module.create_from_file(
            "deeptech/examples/mnist_model.json",
            "MNISTModel",
            num_classes=10,
            logits=True)

        # Config for training
        self.training_loss = SparseCrossEntropyLossFromLogits
        self.training_optimizer = smart_optimizer(SGD)
        self.training_trainer = SupervisedTrainer
        self.training_epochs = 10
        self.training_batch_size = 32
Esempio n. 3
0
    def __init__(self, training_name, data_path, training_results_path):
        super().__init__(training_name, data_path, training_results_path)
        # Config of the data
        self.data_dataset = lambda split: COCODataset(
            split, COCODataset.InputType, FasterRCNNOutput)
        self.data_version = 2014
        self.data_image_size = (800, 600)

        # Config of the model
        self.model_categories = []  # Fill from dataset.
        self.model_log_delta_preds = False
        self.model_model = lambda: Module.create(
            "FasterRCNN",
            num_classes=len(self.model_categories),
            log_deltas=self.model_log_delta_preds)

        # Config for training
        self.training_loss = self.create_loss
        self.training_optimizer = smart_optimizer(SGD, momentum=0.9)
        self.training_trainer = SupervisedTrainer
        self.training_epochs = 10
        self.training_batch_size = 1
        self.training_initial_lr = 0.001