Skip to content

Instantly share code, notes, and snippets.

@jamesr66a
Created December 19, 2018 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesr66a/19f4810d612f805e7ec527eae0c09f52 to your computer and use it in GitHub Desktop.
Save jamesr66a/19f4810d612f805e7ec527eae0c09f52 to your computer and use it in GitHub Desktop.
graph(%self : Float(1, 5, 3)
%1 : (Float(1, 3), Float(1, 3))
%4 : Float(12, 3)
%5 : Float(12, 3)
%6 : Float(12)
%7 : Float(12)) {
%hx.1 : Float(1, 3), %hx.2 : Float(1, 3) = prim::TupleUnpack(%1)
%8 : int = prim::Constant[value=1](), scope: LSTM
%9 : int = prim::Constant[value=1](), scope: LSTM
%10 : Tensor[] = aten::split(%self, %8, %9), scope: LSTM
%emb_t.1 : Float(1!, 1, 3), %emb_t.2 : Float(1!, 1, 3), %emb_t.3 : Float(1!, 1, 3), %emb_t.4 : Float(1!, 1, 3), %emb_t : Float(1!, 1, 3) = prim::ListUnpack(%10), scope: LSTM
%16 : int = prim::Constant[value=1](), scope: LSTM
%input.1 : Float(1!, 3) = aten::squeeze(%emb_t.1, %16), scope: LSTM
%47 : Float(3!, 12!) = aten::t(%4), scope: LSTM/LSTMCell[rnn]
%48 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%49 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%50 : Float(1, 12) = aten::addmm(%6, %input.1, %47, %48, %49), scope: LSTM/LSTMCell[rnn]
%51 : Float(3!, 12!) = aten::t(%5), scope: LSTM/LSTMCell[rnn]
%52 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%53 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%54 : Float(1, 12) = aten::addmm(%7, %hx.1, %51, %52, %53), scope: LSTM/LSTMCell[rnn]
%55 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%56 : Float(1, 12) = aten::add(%50, %54, %55), scope: LSTM/LSTMCell[rnn]
%57 : int = prim::Constant[value=4](), scope: LSTM/LSTMCell[rnn]
%58 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%59 : Tensor[] = aten::chunk(%56, %57, %58), scope: LSTM/LSTMCell[rnn]
%60 : Float(1!, 3), %61 : Float(1!, 3), %62 : Float(1!, 3), %63 : Float(1!, 3) = prim::ListUnpack(%59), scope: LSTM/LSTMCell[rnn]
%64 : Float(1, 3) = aten::sigmoid(%60), scope: LSTM/LSTMCell[rnn]
%65 : Float(1, 3) = aten::sigmoid(%61), scope: LSTM/LSTMCell[rnn]
%66 : Float(1, 3) = aten::tanh(%62), scope: LSTM/LSTMCell[rnn]
%67 : Float(1, 3) = aten::sigmoid(%63), scope: LSTM/LSTMCell[rnn]
%68 : Float(1, 3) = aten::mul(%65, %hx.2), scope: LSTM/LSTMCell[rnn]
%69 : Float(1, 3) = aten::mul(%64, %66), scope: LSTM/LSTMCell[rnn]
%70 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%hx.4 : Float(1, 3) = aten::add(%68, %69, %70), scope: LSTM/LSTMCell[rnn]
%72 : Float(1, 3) = aten::tanh(%hx.4), scope: LSTM/LSTMCell[rnn]
%hx.3 : Float(1, 3) = aten::mul(%67, %72), scope: LSTM/LSTMCell[rnn]
%74 : int = prim::Constant[value=1](), scope: LSTM
%input.2 : Float(1!, 3) = aten::squeeze(%emb_t.2, %74), scope: LSTM
%105 : Float(3!, 12!) = aten::t(%4), scope: LSTM/LSTMCell[rnn]
%106 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%107 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%108 : Float(1, 12) = aten::addmm(%6, %input.2, %105, %106, %107), scope: LSTM/LSTMCell[rnn]
%109 : Float(3!, 12!) = aten::t(%5), scope: LSTM/LSTMCell[rnn]
%110 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%111 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%112 : Float(1, 12) = aten::addmm(%7, %hx.3, %109, %110, %111), scope: LSTM/LSTMCell[rnn]
%113 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%114 : Float(1, 12) = aten::add(%108, %112, %113), scope: LSTM/LSTMCell[rnn]
%115 : int = prim::Constant[value=4](), scope: LSTM/LSTMCell[rnn]
%116 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%117 : Tensor[] = aten::chunk(%114, %115, %116), scope: LSTM/LSTMCell[rnn]
%118 : Float(1!, 3), %119 : Float(1!, 3), %120 : Float(1!, 3), %121 : Float(1!, 3) = prim::ListUnpack(%117), scope: LSTM/LSTMCell[rnn]
%122 : Float(1, 3) = aten::sigmoid(%118), scope: LSTM/LSTMCell[rnn]
%123 : Float(1, 3) = aten::sigmoid(%119), scope: LSTM/LSTMCell[rnn]
%124 : Float(1, 3) = aten::tanh(%120), scope: LSTM/LSTMCell[rnn]
%125 : Float(1, 3) = aten::sigmoid(%121), scope: LSTM/LSTMCell[rnn]
%126 : Float(1, 3) = aten::mul(%123, %hx.4), scope: LSTM/LSTMCell[rnn]
%127 : Float(1, 3) = aten::mul(%122, %124), scope: LSTM/LSTMCell[rnn]
%128 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%hx.6 : Float(1, 3) = aten::add(%126, %127, %128), scope: LSTM/LSTMCell[rnn]
%130 : Float(1, 3) = aten::tanh(%hx.6), scope: LSTM/LSTMCell[rnn]
%hx.5 : Float(1, 3) = aten::mul(%125, %130), scope: LSTM/LSTMCell[rnn]
%132 : int = prim::Constant[value=1](), scope: LSTM
%input.3 : Float(1!, 3) = aten::squeeze(%emb_t.3, %132), scope: LSTM
%163 : Float(3!, 12!) = aten::t(%4), scope: LSTM/LSTMCell[rnn]
%164 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%165 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%166 : Float(1, 12) = aten::addmm(%6, %input.3, %163, %164, %165), scope: LSTM/LSTMCell[rnn]
%167 : Float(3!, 12!) = aten::t(%5), scope: LSTM/LSTMCell[rnn]
%168 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%169 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%170 : Float(1, 12) = aten::addmm(%7, %hx.5, %167, %168, %169), scope: LSTM/LSTMCell[rnn]
%171 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%172 : Float(1, 12) = aten::add(%166, %170, %171), scope: LSTM/LSTMCell[rnn]
%173 : int = prim::Constant[value=4](), scope: LSTM/LSTMCell[rnn]
%174 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%175 : Tensor[] = aten::chunk(%172, %173, %174), scope: LSTM/LSTMCell[rnn]
%176 : Float(1!, 3), %177 : Float(1!, 3), %178 : Float(1!, 3), %179 : Float(1!, 3) = prim::ListUnpack(%175), scope: LSTM/LSTMCell[rnn]
%180 : Float(1, 3) = aten::sigmoid(%176), scope: LSTM/LSTMCell[rnn]
%181 : Float(1, 3) = aten::sigmoid(%177), scope: LSTM/LSTMCell[rnn]
%182 : Float(1, 3) = aten::tanh(%178), scope: LSTM/LSTMCell[rnn]
%183 : Float(1, 3) = aten::sigmoid(%179), scope: LSTM/LSTMCell[rnn]
%184 : Float(1, 3) = aten::mul(%181, %hx.6), scope: LSTM/LSTMCell[rnn]
%185 : Float(1, 3) = aten::mul(%180, %182), scope: LSTM/LSTMCell[rnn]
%186 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%hx.8 : Float(1, 3) = aten::add(%184, %185, %186), scope: LSTM/LSTMCell[rnn]
%188 : Float(1, 3) = aten::tanh(%hx.8), scope: LSTM/LSTMCell[rnn]
%hx.7 : Float(1, 3) = aten::mul(%183, %188), scope: LSTM/LSTMCell[rnn]
%190 : int = prim::Constant[value=1](), scope: LSTM
%input.4 : Float(1!, 3) = aten::squeeze(%emb_t.4, %190), scope: LSTM
%221 : Float(3!, 12!) = aten::t(%4), scope: LSTM/LSTMCell[rnn]
%222 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%223 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%224 : Float(1, 12) = aten::addmm(%6, %input.4, %221, %222, %223), scope: LSTM/LSTMCell[rnn]
%225 : Float(3!, 12!) = aten::t(%5), scope: LSTM/LSTMCell[rnn]
%226 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%227 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%228 : Float(1, 12) = aten::addmm(%7, %hx.7, %225, %226, %227), scope: LSTM/LSTMCell[rnn]
%229 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%230 : Float(1, 12) = aten::add(%224, %228, %229), scope: LSTM/LSTMCell[rnn]
%231 : int = prim::Constant[value=4](), scope: LSTM/LSTMCell[rnn]
%232 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%233 : Tensor[] = aten::chunk(%230, %231, %232), scope: LSTM/LSTMCell[rnn]
%234 : Float(1!, 3), %235 : Float(1!, 3), %236 : Float(1!, 3), %237 : Float(1!, 3) = prim::ListUnpack(%233), scope: LSTM/LSTMCell[rnn]
%238 : Float(1, 3) = aten::sigmoid(%234), scope: LSTM/LSTMCell[rnn]
%239 : Float(1, 3) = aten::sigmoid(%235), scope: LSTM/LSTMCell[rnn]
%240 : Float(1, 3) = aten::tanh(%236), scope: LSTM/LSTMCell[rnn]
%241 : Float(1, 3) = aten::sigmoid(%237), scope: LSTM/LSTMCell[rnn]
%242 : Float(1, 3) = aten::mul(%239, %hx.8), scope: LSTM/LSTMCell[rnn]
%243 : Float(1, 3) = aten::mul(%238, %240), scope: LSTM/LSTMCell[rnn]
%244 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%hx : Float(1, 3) = aten::add(%242, %243, %244), scope: LSTM/LSTMCell[rnn]
%246 : Float(1, 3) = aten::tanh(%hx), scope: LSTM/LSTMCell[rnn]
%hx.9 : Float(1, 3) = aten::mul(%241, %246), scope: LSTM/LSTMCell[rnn]
%248 : int = prim::Constant[value=1](), scope: LSTM
%input : Float(1!, 3) = aten::squeeze(%emb_t, %248), scope: LSTM
%279 : Float(3!, 12!) = aten::t(%4), scope: LSTM/LSTMCell[rnn]
%280 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%281 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%282 : Float(1, 12) = aten::addmm(%6, %input, %279, %280, %281), scope: LSTM/LSTMCell[rnn]
%283 : Float(3!, 12!) = aten::t(%5), scope: LSTM/LSTMCell[rnn]
%284 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%285 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%286 : Float(1, 12) = aten::addmm(%7, %hx.9, %283, %284, %285), scope: LSTM/LSTMCell[rnn]
%287 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%288 : Float(1, 12) = aten::add(%282, %286, %287), scope: LSTM/LSTMCell[rnn]
%289 : int = prim::Constant[value=4](), scope: LSTM/LSTMCell[rnn]
%290 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%291 : Tensor[] = aten::chunk(%288, %289, %290), scope: LSTM/LSTMCell[rnn]
%292 : Float(1!, 3), %293 : Float(1!, 3), %294 : Float(1!, 3), %295 : Float(1!, 3) = prim::ListUnpack(%291), scope: LSTM/LSTMCell[rnn]
%296 : Float(1, 3) = aten::sigmoid(%292), scope: LSTM/LSTMCell[rnn]
%297 : Float(1, 3) = aten::sigmoid(%293), scope: LSTM/LSTMCell[rnn]
%298 : Float(1, 3) = aten::tanh(%294), scope: LSTM/LSTMCell[rnn]
%299 : Float(1, 3) = aten::sigmoid(%295), scope: LSTM/LSTMCell[rnn]
%300 : Float(1, 3) = aten::mul(%297, %hx), scope: LSTM/LSTMCell[rnn]
%301 : Float(1, 3) = aten::mul(%296, %298), scope: LSTM/LSTMCell[rnn]
%302 : int = prim::Constant[value=1](), scope: LSTM/LSTMCell[rnn]
%303 : Float(1, 3) = aten::add(%300, %301, %302), scope: LSTM/LSTMCell[rnn]
%304 : Float(1, 3) = aten::tanh(%303), scope: LSTM/LSTMCell[rnn]
%305 : Float(1, 3) = aten::mul(%299, %304), scope: LSTM/LSTMCell[rnn]
%306 : (Float(1, 3), Float(1, 3)) = prim::TupleConstruct(%305, %303)
return (%306);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment