Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/tutorials
/ make_target
Function
make_target
beginner_source/nlp/deep_learning_tutorial.py:290–291 ·
view source on GitHub ↗
(label, label_to_ix)
Source
from the content-addressed store, hash-verified
288
289
290
def
make_target(label, label_to_ix):
291
return
torch.LongTensor([label_to_ix[label]])
292
293
294
model = BoWClassifier(NUM_LABELS, VOCAB_SIZE)
Callers
1
deep_learning_tutorial.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected