Git Product home page Git Product logo

Comments (12)

nouiz avatar nouiz commented on June 3, 2024

Use int64 in that case. This is what we use for the infer_shape.

For safety, we should use run Theano tests on windows for that PR.

from theano.

lamblin avatar lamblin commented on June 3, 2024

For safety, test on windows and with a 32-bit python

from theano.

abergeron avatar abergeron commented on June 3, 2024

This issue should be closed as we don't do this anymore.

from theano.

nouiz avatar nouiz commented on June 3, 2024

Why did you close this? We still do this. Just grep the file tensor/raw_random.py for int32.

from theano.

lamblin avatar lamblin commented on June 3, 2024

@nouiz is right, we are still doing that for the provided shape argument (not for the infer_shape mechanism).

from theano.

abergeron avatar abergeron commented on June 3, 2024

The cast there https://github.com/Theano/Theano/blob/master/theano/tensor/raw_random.py#L187 is only done when shape == ().

Unless you mean something else.

from theano.

lamblin avatar lamblin commented on June 3, 2024

from theano.

abergeron avatar abergeron commented on June 3, 2024

Oh, ok.

from theano.

lamblin avatar lamblin commented on June 3, 2024

Actually, we also do that in theano/sandbox/rng_mrg.py (l. 334, l. 542, l. 784), and we assert that the dtype is int32 in the C code (l. 425, l. 674, l. 932).
I'm not sure what we should do for that case.

from theano.

lamblin avatar lamblin commented on June 3, 2024

So, for rng_mrg.py, here is what we should do, at all 3 places:

  • In the graph, make sure shapes are int64.
  • In the C code, expect int64, and check the values when setting odims[i] to make sure it fits in int32, raise a ValueError if it does not.

@yaoli this is your ticket.

from theano.

yaoli avatar yaoli commented on June 3, 2024

I'd appreciate if someone has a chat with me of this problem as I'm not sure if I understand it correctly.

from theano.

bouthilx avatar bouthilx commented on June 3, 2024

@yaoli We can chat on google hangout

from theano.

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.