Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
8
def
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
15
def
batchify(data, bsz, args):
Callers
5
evaluate
Function · 0.90
train
Function · 0.90
evaluate
Function · 0.90
evaluate
Function · 0.90
train
Function · 0.90
Calls
no outgoing calls
Tested by
1
evaluate
Function · 0.72