Coder Social home page Coder Social logo

Comments (5)

lukealonso avatar lukealonso commented on June 15, 2024

Hi @ronanmoynihan ,

The following is not safe:

if type(inputs.T)~='table' then

Autograd wraps all your tensor input parameters, to allow them to be tracked throughout the function. So while you can apply the usual torch functions / operators to them, you shouldn't check the types.

It seems like you were trying to work around the fact that assignment in the form of:

delta[torch.gt(delta,0)] =

Is not currently a supported operation. Let me talk to the team and see what can be done.

Luke

from torch-autograd.

lukealonso avatar lukealonso commented on June 15, 2024

Also, using the : operator is not valid. You'll have to rewrite:

inputs.x:size(1)

to

torch.size(inputs.x, 1)

etc

from torch-autograd.

ronanmoynihan avatar ronanmoynihan commented on June 15, 2024

Hi @luketwitter,
OK, yeah I was thinking those commands (.gt & .lt) were not supported when I first started using it but managed to get a model training somewhat as I expected which gave similar predictions to a model that wasn't using Autograd.

This is a simple test on the Boston housing data and similar to the gradCheck linked above using a normal Torch NN with an Autograd criterion.

https://github.com/ronanmoynihan/autograd-criterion/blob/master/main.lua

th main.lua -under

from torch-autograd.

alexbw avatar alexbw commented on June 15, 2024

@ronanmoynihan Are you still having issues or can I close?

from torch-autograd.

ronanmoynihan avatar ronanmoynihan commented on June 15, 2024

Hi @alexbw you can close it.
Thanks.

from torch-autograd.

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.