MCPcopy
hub / github.com/quark0/darts / repackage_hidden

Function repackage_hidden

rnn/utils.py:8–12  ·  view source on GitHub ↗
(h)

Source from the content-addressed store, hash-verified

6
7
8def repackage_hidden(h):
9 if type(h) == Variable:
10 return Variable(h.data)
11 else:
12 return tuple(repackage_hidden(v) for v in h)
13
14
15def batchify(data, bsz, args):

Callers 5

evaluateFunction · 0.90
trainFunction · 0.90
evaluateFunction · 0.90
evaluateFunction · 0.90
trainFunction · 0.90

Calls

no outgoing calls

Tested by 1

evaluateFunction · 0.72