Skip to content

Instantly share code, notes, and snippets.

@jamesr66a
Created December 25, 2017 03:26
Show Gist options
  • Save jamesr66a/b0758b19b8bf8d7f391bd18a4271c53b to your computer and use it in GitHub Desktop.
Save jamesr66a/b0758b19b8bf8d7f391bd18a4271c53b to your computer and use it in GitHub Desktop.
+-Module
+-ClassDef(Sequence)
+-FuncDef(__init__)
+-Args
+-Arg(self)
+-Expr
+-Call
+-Attribute
+-Call
+-Name(super)
+-Args
+-Name(Sequence)
+-Name(self)
+-string "__init__"
+-Args
+-Assign
+-Attribute
+-Name(self)
+-string "lstm1"
+-Call
+-Attribute
+-Name(nn)
+-string "LSTMCell"
+-Args
+-Num(1)
+-Num(51)
+-Assign
+-Attribute
+-Name(self)
+-string "lstm2"
+-Call
+-Attribute
+-Name(nn)
+-string "LSTMCell"
+-Args
+-Num(51)
+-Num(51)
+-Assign
+-Attribute
+-Name(self)
+-string "linear"
+-Call
+-Attribute
+-Name(nn)
+-string "Linear"
+-Args
+-Num(51)
+-Num(1)
+-FuncDef(forward)
+-Args
+-Arg(self)
+-Arg(input)
+-Arg(future)
+-Assign
+-Name(outputs)
+-List
+-Assign
+-Name(h_t)
+-Call
+-Name(Variable)
+-Args
+-Call
+-Attribute
+-Call
+-Attribute
+-Name(torch)
+-string "zeros"
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "size"
+-Args
+-Num(0)
+-Num(51)
+-string "double"
+-Args
+-Kwarg
+-string "requires_grad"
+-NameConstant(False)
+-Assign
+-Name(c_t)
+-Call
+-Name(Variable)
+-Args
+-Call
+-Attribute
+-Call
+-Attribute
+-Name(torch)
+-string "zeros"
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "size"
+-Args
+-Num(0)
+-Num(51)
+-string "double"
+-Args
+-Kwarg
+-string "requires_grad"
+-NameConstant(False)
+-Assign
+-Name(h_t2)
+-Call
+-Name(Variable)
+-Args
+-Call
+-Attribute
+-Call
+-Attribute
+-Name(torch)
+-string "zeros"
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "size"
+-Args
+-Num(0)
+-Num(51)
+-string "double"
+-Args
+-Kwarg
+-string "requires_grad"
+-NameConstant(False)
+-Assign
+-Name(c_t2)
+-Call
+-Name(Variable)
+-Args
+-Call
+-Attribute
+-Call
+-Attribute
+-Name(torch)
+-string "zeros"
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "size"
+-Args
+-Num(0)
+-Num(51)
+-string "double"
+-Args
+-Kwarg
+-string "requires_grad"
+-NameConstant(False)
+-For
+-Tuple
+-Name(i)
+-Name(input_t)
+-Call
+-Name(enumerate)
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "chunk"
+-Args
+-Call
+-Attribute
+-Name(input)
+-string "size"
+-Args
+-Num(1)
+-Kwarg
+-string "dim"
+-Num(1)
+-Assign
+-Tuple
+-Name(h_t)
+-Name(c_t)
+-Call
+-Attribute
+-Name(self)
+-string "lstm1"
+-Args
+-Name(input_t)
+-Tuple
+-Name(h_t)
+-Name(c_t)
+-Assign
+-Tuple
+-Name(h_t2)
+-Name(c_t2)
+-Call
+-Attribute
+-Name(self)
+-string "lstm2"
+-Args
+-Name(h_t)
+-Tuple
+-Name(h_t2)
+-Name(c_t2)
+-Assign
+-Name(output)
+-Call
+-Attribute
+-Name(self)
+-string "linear"
+-Args
+-Name(h_t2)
+-AugAssign
+-Name(outputs)
+-Add
+-List
+-Name(output)
+-For
+-Name(i)
+-Call
+-Name(range)
+-Args
+-Name(future)
+-Assign
+-Tuple
+-Name(h_t)
+-Name(c_t)
+-Call
+-Attribute
+-Name(self)
+-string "lstm1"
+-Args
+-Name(output)
+-Tuple
+-Name(h_t)
+-Name(c_t)
+-Assign
+-Tuple
+-Name(h_t2)
+-Name(c_t2)
+-Call
+-Attribute
+-Name(self)
+-string "lstm2"
+-Args
+-Name(h_t)
+-Tuple
+-Name(h_t2)
+-Name(c_t2)
+-Assign
+-Name(output)
+-Call
+-Attribute
+-Name(self)
+-string "linear"
+-Args
+-Name(h_t2)
+-AugAssign
+-Name(outputs)
+-Add
+-List
+-Name(output)
+-Assign
+-Name(outputs)
+-Call
+-Attribute
+-Call
+-Attribute
+-Name(torch)
+-string "stack"
+-Args
+-Name(outputs)
+-Num(1)
+-string "squeeze"
+-Args
+-Num(2)
+-Return
+-Name(outputs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment