Skip to content

Commit

Permalink
Super resolution network (pytorch#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
prigoyal authored and ezyang committed Sep 5, 2017
1 parent a783a37 commit d2563a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torch/autograd/_functions/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def backward(ctx, grad_output):

class Permute(Function):

@staticmethod
def primspec(g, input, dim_indices):
return (g.appendNode(g.create("Transpose", [input]))
.is_("axes", dim_indices))

@staticmethod
def forward(ctx, input, dim_indices):
ctx.rev_dim_indices = [None for _ in range(len(dim_indices))]
Expand Down

0 comments on commit d2563a9

Please sign in to comment.