MCPcopy 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
290def make_target(label, label_to_ix):
291 return torch.LongTensor([label_to_ix[label]])
292
293
294model = BoWClassifier(NUM_LABELS, VOCAB_SIZE)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected