Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/tutorials
/ initHidden
Method
initHidden
intermediate_source/char_rnn_generation_tutorial.py:178–179 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
176
return
output, hidden
177
178
def
initHidden(self):
179
return
torch.zeros(1, self.hidden_size)
180
181
182
######################################################################
Callers
2
train
Function · 0.80
sample
Function · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected