Coder Social home page Coder Social logo

Comments (5)

Jegp avatar Jegp commented on June 25, 2024

Thank you for the report @StrasserFlorian! This is definitely not expected behavior, and I can see there's a bug in the way we concatenate tensors if we get unexpected inputs with different dimensionality.

I was wondering, is the expected output really shaped 100, 10, 3 or is it 100, 3, 10? That is, should the additional dimension be inserted between the outer and inner dimensions, or is it desirable to append the additional dimension in case we wish to process higher-dimensional (>3) tensors.

from norse.

StrasserFlorian avatar StrasserFlorian commented on June 25, 2024

Hi @Jegp,
i think your suggestion of appending the additional dimension at the end makes more sense. I only thought it might be on purpose to insert it in the middle, since that is how the size of the new Tensor is defined right now in the code:
size = (input_values.size(0), out_features) + input_values.size()[1:]

from norse.

Jegp avatar Jegp commented on June 25, 2024

I've written a fix in this PR: #351

Note that this changes the location where the new dimension is inserted. I do think that the new version makes more sense. Always inserting at dimension 1 may be somewhat arbitrary. For example, if the input tensor shape is batch-width-height, it'll be inserted between batch-width, but if the input tensor is time-batch-width, it'll be between time-batch.

Would you mind checking out the PR code to see if that correctly addresses the problem? :-)

from norse.

StrasserFlorian avatar StrasserFlorian commented on June 25, 2024

Yes, i think implementing it this way makes the most sense. Looks good! πŸ‘

from norse.

Jegp avatar Jegp commented on June 25, 2024

Apologies for the delay, but this should now be fixed with #351 . Please don't hesitate to reopen this if you're still experiencing issues.

from norse.

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.