MCPcopy Index your code
hub / github.com/pytorch/pytorch / __init__

Method __init__

caffe2/python/queue_util.py:76–84  ·  view source on GitHub ↗
(self, capacity, schema=None, name='queue',
                 num_dequeue_records=1)

Source from the content-addressed store, hash-verified

74
75class Queue(QueueWrapper):
76 def __init__(self, capacity, schema=None, name='queue',
77 num_dequeue_records=1):
78 # find a unique blob name for the queue
79 net = core.Net(name)
80 queue_blob = net.AddExternalInput(net.NextName('handler'))
81 QueueWrapper.__init__(
82 self, queue_blob, schema, num_dequeue_records=num_dequeue_records)
83 self.capacity = capacity
84 self._setup_done = False
85
86 def setup(self, global_init_net):
87 assert self._schema, 'This queue does not have a schema.'

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 3

AddExternalInputMethod · 0.95
NextNameMethod · 0.95
NetMethod · 0.80

Tested by

no test coverage detected