pytorch-apple-silicon icon indicating copy to clipboard operation
pytorch-apple-silicon copied to clipboard

File 01_cifar10_tinyvgg.ipynb comma problem

Open RoversX opened this issue 1 year ago • 1 comments

4. Train the model on CPU and MPS device (GPU)

Hello, I think This part "model": model.class.name, # Add a comma here, need to add a comma.

  # Create results dict
results = {
    "machine": MACHINE,
    "device": device,
    "dataset_name": DATASET_NAME,
    "epochs": NUM_EPOCHS,
    "batch_size": BATCH_SIZE,
    "image_size": IMAGE_SIZE[0],
    "num_train_samples": len(train_data),
    "num_test_samples": len(test_data),
    "total_train_time": round(total_train_time, 3),
    "time_per_epoch": round(total_train_time/NUM_EPOCHS, 3),
    "model": model.__class__.__name__,  # Add a comma here
    "test_accuracy": model_results["test_acc"][-1]
}

RoversX avatar May 19 '23 13:05 RoversX

I hit the same issue when trying the benchmark, and also added the comma in my version.

I've proposed a PR for the change. Hope that helps.

planetf1 avatar May 29 '23 11:05 planetf1