Giter Site home page Giter Site logo

Comments (4)

adekusar-drl avatar adekusar-drl commented on July 29, 2024

@woodsp-ibm Interesting, this may happen if input_grad.shape has a zero element. A solution off the top of my head is just to add an additional if input_grad is not None before the einsum, but I'm not sure. Is there a test case to reproduce the issue?

from qiskit-machine-learning.

woodsp-ibm avatar woodsp-ibm commented on July 29, 2024

Indeed doing the einsum conditionally like that, which is how the failure was avoided so further progress could be made, but since it changed input_grad to None, which is then what is returned, I was not so sure. I don't have a small test case at present but I can see if I can get something even the failing code itself.

from qiskit-machine-learning.

IceKhan13 avatar IceKhan13 commented on July 29, 2024

I think, those cases should be handled in NeuralNetwork validate methods (validate inputs, weights and backwards).

https://github.com/Qiskit/qiskit-machine-learning/blob/00831061ca0206af42e131fcb9b605c4acd404fa/qiskit_machine_learning/neural_networks/neural_network.py#L217-L223

Looks like something is zeroing one of the dims in implementation of _backward.

I can look at it

from qiskit-machine-learning.

adekusar-drl avatar adekusar-drl commented on July 29, 2024

@IceKhan13 Sure, you can take a look.

from qiskit-machine-learning.

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.