Coder Social home page Coder Social logo

megum1 / beagle Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 2.0 294.15 MB

[NDSS'23] BEAGLE: Forensics of Deep Learning Backdoor Attack for Better Defense

Home Page: https://www.cs.purdue.edu/homes/cheng535/

License: MIT License

Python 100.00%
backdoor-attacks backdoor-defenses machine-learning

beagle's People

Contributors

megum1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rzens

beagle's Issues

RuntimeError: Dimension Mismatch in Element-wise Operation

I encountered a runtime error while working on a project that involves performing element-wise operations between three tensors: batch_data, weights, and bias. The error message I received is as follows:
RuntimeError: The size of tensor a (3) must match the size of tensor b (0) at non-singleton dimension 1

The issue arises from a dimension mismatch along dimension 1 when trying to perform element-wise operations. Here are the shapes of the tensors involved:
batch_data shape: torch.Size([30, 3, 224, 224])
weights shape: torch.Size([30, 9, 224, 224])
bias shape: torch.Size([30, 3, 224, 224])

I have resolved the issue by using the bias tensor as it is, without dividing it into three parts. This approach correctly adds the bias term to each channel of the batch_data without any channel-wise adjustments, and it resolved the dimension mismatch error. If you have any further questions or encounter related issues, please feel free to reopen or create a new issue. Thank you for your support!

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.