Skip to content
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

bugs in README.md and Documentation about evaluate #40

Closed
rainbowtp opened this issue Sep 3, 2021 · 2 comments · Fixed by #46
Closed

bugs in README.md and Documentation about evaluate #40

rainbowtp opened this issue Sep 3, 2021 · 2 comments · Fixed by #46

Comments

@rainbowtp
Copy link

The Argument which is in torch_mimicry.metrics.evaluate() should be dataset ,but not dataset_name

err:
fid_score() got an unexpected keyword argument 'dataset_name'

README.md:

import torch
import torch.optim as optim
import torch_mimicry as mmc
from torch_mimicry.nets import sngan

# Data handling objects
... ...

# Start training
... ...

# Evaluate fid
mmc.metrics.evaluate(
    metric='fid',
    log_dir='./log/example',
    netG=netG,
    dataset_name='cifar10',     # should be dataset='cifar10'
    num_real_samples=50000,
    num_fake_samples=50000,
    evaluate_step=100000,
    device=device)

Documentation:
# Evaluate fid

I think that's why:
argument: dataset

def fid_score(num_real_samples,
              num_fake_samples,
              netG,
              dataset, #  The argument which is in torch_mimicry.metrics.evaluate() should be same as this one
              seed=0,
              device=None,
              batch_size=50,
              verbose=True,
              stats_file=None,
              log_dir='./log'):
@SuperbTUM
Copy link

Agreed. Also, I am not sure what the attribute stats_file means, since it is mandatory if a custom dataset is applied.

@kwotsin
Copy link
Owner

kwotsin commented Aug 7, 2022

Thanks for raising this issue, I updated the library some time back but I forgot to update the README so it was still using an old argument that is not valid anymore. I've fixed this issue in a recent PR linked.

Please reinstall with pip install git+https://github.com/kwotsin/mimicry.git for the latest version, thank you!

@kwotsin kwotsin closed this as completed Aug 7, 2022
@kwotsin kwotsin linked a pull request Aug 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants