Giter Site home page Giter Site logo

Using a custom model about trojanzoo HOT 4 CLOSED

GorkaAbad avatar GorkaAbad commented on August 14, 2024
Using a custom model

from trojanzoo.

Comments (4)

ain-soph avatar ain-soph commented on August 14, 2024

There are certain modules in trojanzoo workflow: dataset, model, mark, attack, defense.

Since you have already got a poisoned model, please import it in model module.

  • If it's an existing model architecture (e.g., resnet18), you only need to import the weight parameters using model.load() (You may need to change layer names to get adapted to trojanzoo style.)
  • If not, you need to register your own model class (one _ImageModel and another ImageModel, see how resnet works.)

Afterwards, you could use all existing defenses with setting attack as --attack badnet (it's okay that your attack is actually not badnet). You need to provide mark image or tensor to mark module to make sure the ASR validation is correct.

from trojanzoo.

GorkaAbad avatar GorkaAbad commented on August 14, 2024

Okay, I think I make it work for my use case. However, I cannot see the anomaly score for my model when using Neural Cleanse. Is there anything similar in trojanzoo?

Thanks in advance

from trojanzoo.

ain-soph avatar ain-soph commented on August 14, 2024

MAD is the anomaly score.

from trojanzoo.

ain-soph avatar ain-soph commented on August 14, 2024

If you have no question, plz close this issue.

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.