Skip to content

auto-wrap tensors as inputs to autograd #274

@soumith

Description

@soumith

A request from @jcjohnson that's pretty reasonable, needs to be implemented

Having to feed Variables as input to Modules is somewhat annoying, especially since DataLoader provides Tensors. On the one hand explicitly constructing variables makes it clear that Tensors and Variables are different beasts, but on the other hand it is a bit of syntactic noise that shows up in a lot of places. Would it be a terrible idea to have the forward method of a Module autowrap input Tensors into Variables?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions