Giter Club home page Giter Club logo

foolbox-native's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

foolbox-native's Issues

No error displayed but error occurs!

Hi there, here is my error. It doesn't say anything which was is wrong!
my code is :
fbn.utils.accuracy(fmodel, images, labels)

my output is:

AssertionError                            Traceback (most recent call last)
<ipython-input-94-2fdb7e703e80> in <module>
----> 1 fbn.utils.accuracy(fmodel, images, labels)

***/lib/python3.6/site-packages/foolbox/ext/native/utils.py in accuracy(fmodel, inputs, labels)
      8 
      9 def accuracy(fmodel, inputs, labels):
---> 10     logits = ep.astensor(fmodel.forward(inputs))
     11     predictions = logits.argmax(axis=-1)
     12     accuracy = (predictions == labels).float32().mean()

***/lib/python3.6/site-packages/foolbox/ext/native/models/pytorch.py in forward(self, inputs)
     74     def forward(self, inputs):
     75         x = inputs
---> 76         assert x.device == self.device
     77         x = self._preprocess(x)
     78         x = self._model(x)

AssertionError: 

Any help needed?

Hi guys, this initiative is really nice. Do you need any help writing it?

AttributeError: 'PyTorchTensor' object has no attribute 'tensor'

File ".../foolbox/ext/native/attacks/basic_iterative_method.py", line 98, in call
gradients = ep.astensor(self.model.gradient(x.tensor, y.tensor))
AttributeError: 'PyTorchTensor' object has no attribute 'tensor'

I get the following error on running the example code. I am using the right version of Pytorch as required. Probably the PyTorch attack is being directed to the TensorFlow version somewhere.

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.