We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
之前没有太多的调参经验,想知道像这里的MNIST如果要替换成自己的dataset的话大致需要怎么做?
-- [INCOMPLETE] configs/mnist/plain_usage/cfg.py --
from torchvision.datasets import MNIST from alchemy_cat.dl_config import Config
cfg = Config()
cfg.rand_seed = 0
cfg.dt.cls = MNIST cfg.dt.ini.root = '/tmp/data' cfg.dt.ini.train = True
... Code Omitted.
The text was updated successfully, but these errors were encountered:
最直接的办法,就是直接修改configs/mnist/plain_usage/cfg.py。以改为 CIFAR10 数据集为例,只需要修改cfg.dt下的配置项:
configs/mnist/plain_usage/cfg.py
cfg.dt
cfg.dt.cls = CIFAR10 cfg.dt.ini.root = '/tmp/data' cfg.dt.ini.transform = T.Compose([T.ToTensor(), T.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
不过,我们更推荐参考继承一节中的例子,写一个新配置,新配置继承configs/mnist/plain_usage/cfg.py,但将数据集修改为自定义数据集。还是以改为 CIFAR10 为例:
-- configs/CIFAR10/cfg.py -- from alchemy_cat.dl_config import Config import torchvision.transforms as T from torchvision.datasets import CIFAR10 cfg = Config(caps='configs/mnist/plain_usage/cfg.py') cfg.dt.override() cfg.dt.cls = CIFAR10 cfg.dt.ini.root = '/tmp/data' cfg.dt.ini.transform = T.Compose([T.ToTensor(), T.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
Sorry, something went wrong.
No branches or pull requests
之前没有太多的调参经验,想知道像这里的MNIST如果要替换成自己的dataset的话大致需要怎么做?
from torchvision.datasets import MNIST
from alchemy_cat.dl_config import Config
cfg = Config()
cfg.rand_seed = 0
cfg.dt.cls = MNIST
cfg.dt.ini.root = '/tmp/data'
cfg.dt.ini.train = True
... Code Omitted.
The text was updated successfully, but these errors were encountered: