Skip to content

[FBcode->GH] Enable analytics logging for MNIST and CIFAR #4090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions torchvision/datasets/cifar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os.path
import numpy as np
import pickle
import torch
from typing import Any, Callable, Optional, Tuple

from .vision import VisionDataset
Expand Down Expand Up @@ -58,6 +59,7 @@ def __init__(

super(CIFAR10, self).__init__(root, transform=transform,
target_transform=target_transform)
torch._C._log_api_usage_once(f"torchvision.datasets.{self.__class__.__name__}")

self.train = train # training set or test set

Expand Down
1 change: 1 addition & 0 deletions torchvision/datasets/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(
) -> None:
super(MNIST, self).__init__(root, transform=transform,
target_transform=target_transform)
torch._C._log_api_usage_once(f"torchvision.datasets.{self.__class__.__name__}")
self.train = train # training set or test set

if self._check_legacy_exist():
Expand Down