def train_inception_har():
    print("Running HAR")
    data_folder = Path('../data/UCI_HAR_Dataset')
    device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    print(device)
    model = InceptionModel(num_blocks=1,
                           in_channels=9,
                           out_channels=32,
                           bottleneck_channels=2,
                           kernel_sizes=20,
                           use_residuals=True,
                           num_pred_classes=6)
    model.to(device)
    trainer = HARTrainer(model=model, data_folder=data_folder)
    #trainer.fit()

    wandb.agent(sweep_id, function=trainer.fit, count=648)
def train_inception_wisdm():
    print("Running WISDM")
    device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
    model = InceptionModel(num_blocks=1,
                           in_channels=3,
                           out_channels=32,
                           bottleneck_channels=2,
                           kernel_sizes=20,
                           use_residuals=True,
                           num_pred_classes=6)
    model.to(device)
    trainer = WISDMTrainer(model=model)
    trainer.fit()

    savepath = trainer.save_model()
    #savepath = Path("data/models/InceptionModel/InceptionModel_model_wisdm_20_epochs.pkl")
    new_trainer = load_wisdm_trainer(savepath)
    new_trainer.evaluate()