Coder Social home page Coder Social logo

Comments (6)

ain-soph avatar ain-soph commented on May 25, 2024

No, that's not correct. get_layer expected to get a layer_output: str but now you pass a list to it.
https://ain-soph.github.io/trojanzoo/trojanzoo/utils/model.html#trojanzoo.utils.model.get_layer

I'm currently working on 1.1 version of trojanzoo, which shall contain huge updates, and fix all places inconsistent from original paper. And besides, the current docs only work for v1.1 or newer as well.
https://ain-soph.github.io/trojanzoo/

I just updated ABS in current github repo. You may take a try by installing using develop mode pip install -e .
Sadly ABS docs are still not done yet. Hope my codes could bring you a clean overview.

from trojanzoo.

ain-soph avatar ain-soph commented on May 25, 2024

We expect model structure is

[preprocess, features, pool, flatten, classifier]

This is defined in trojanzoo.models._Model (https://ain-soph.github.io/trojanzoo/trojanzoo/models.html#trojanzoo.models._Model)
Does your model structure follow this pattern?

from trojanzoo.

programehr avatar programehr commented on May 25, 2024

No, that's not correct. get_layer expected to get a layer_output: str but now you pass a list to it. https://ain-soph.github.io/trojanzoo/trojanzoo/utils/model.html#trojanzoo.utils.model.get_layer

That actually is a str and the code works. I'm just wondering if it is logically correct or not.

I'm currently working on 1.1 version of trojanzoo, which shall contain huge updates, and fix all places inconsistent from original paper. And besides, the current docs only work for v1.1 or newer as well. https://ain-soph.github.io/trojanzoo/

I just updated ABS in current github repo. You may take a try by installing using develop mode pip install -e . Sadly ABS docs are still not done yet. Hope my codes could bring you a clean overview.

I have built my code on top of 1.0.8, and it is a bit difficult to a newer version. I may give it a try, though.

from trojanzoo.

programehr avatar programehr commented on May 25, 2024

We expect model structure is

[preprocess, features, pool, flatten, classifier]

This is defined in trojanzoo.models._Model (https://ain-soph.github.io/trojanzoo/trojanzoo/models.html#trojanzoo.models._Model) Does your model structure follow this pattern?

I used the examples/defense code with model=resent18_comp and dataset=cifar10. So I guess it should be correct.

from trojanzoo.

ain-soph avatar ain-soph commented on May 25, 2024

I see. I missed your [0] here and thought it was a list.
So you are actually taking the first layer of classifier.
Yes, it should work.

For the version, I have to say there are a bunch of breaking changes. If you are previously using 1.0.8 and dependent on some concrete implementation, you might find a lot of API changes. There are slight differences for ABS between trojanzoo 1.0.8 and original code. But it shall be fine. You may try the new version in the future.

The new version brings documentation, better code qualities, better code structure and better implementation consistency with original paper (I consulted many first authors of those papers). This is to support the TrojanZoo publication in EuroSP.

Btw, a small survey question. I planned to move to python 3.10 only after PyTorch 1.11 release (within one week). Do you think it’s totally unacceptable if you want to use the library in the future?

from trojanzoo.

ain-soph avatar ain-soph commented on May 25, 2024

I'll close this issue if there is no further concern.

Feel free to reopen it if you have any question.

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.