Coder Social home page Coder Social logo

Comments (2)

ain-soph avatar ain-soph commented on June 4, 2024

Thanks for your bug report!
I admit there are potentially quite some bugs after so many times code re-organization. And we have no unit-test scripts yet.
I'll figure it out in one day, (hopefully).

A suggestion about your test.py is that you should always enable environ like the examples, even though it doesn't matter in this small scenario. It allows you to set config_path, random_seed, default cuda device and some other basic environment settings.

Here's the modified test.py: (run with python test.py --verbose 1 --color --tqdm --dataset gtsrb --download)

# -*- coding: utf-8 -*-

import trojanvision.environ
import trojanvision.datasets
from trojanvision.utils import summary
import argparse


parser = argparse.ArgumentParser()
trojanvision.environ.add_argument(parser)
trojanvision.datasets.add_argument(parser)
args = parser.parse_args()

env = trojanvision.environ.create(**args.__dict__)
dataset = trojanvision.datasets.create(**args.__dict__)
if env['verbose']:
    summary(env=env, dataset=dataset)

Btw, data_format is a very new and unstable argument that haven't been tested well. I'm currently working on it. The basic idea is to load data into memory to avoid latency for data loading on HDD disk. Keep it as default for now.

And another question is, are you using the pip to install trojanzoo? Although it's convenient, sometimes it'll be a little out-of-date. Try to git clone the repo and put test.py in the root dir.


And I guess it's possibly already fixed with the recent commits :)

from trojanzoo.

liu00222 avatar liu00222 commented on June 4, 2024

Many thanks for the response! I think my problem is gone now.

from trojanzoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.