Skip to content

allow z.backward() even for non-scalar outputs #84

@soumith

Description

@soumith

A suggestion from Ross Girshick:

x = Variable(torch.ones(2, 2))
y = x + 2
z = y * y

Allow this instead of giving an error (current master):

z.backward()

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions