MCPcopy Create free account
hub / github.com/pytorch/pytorch / CreateNetOnce

Function CreateNetOnce

caffe2/python/examples/char_rnn.py:31–35  ·  view source on GitHub ↗
(net, created_names=set())

Source from the content-addressed store, hash-verified

29# Default set() here is intentional as it would accumulate values like a global
30# variable
31def CreateNetOnce(net, created_names=set()): # noqa
32 name = net.Name()
33 if name not in created_names:
34 created_names.add(name)
35 workspace.CreateNet(net)
36
37
38class CharRNN:

Callers 2

TrainModelMethod · 0.85
GenerateTextMethod · 0.85

Calls 2

NameMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…