MCPcopy Create free account
hub / github.com/BVLC/caffe / __init__

Method __init__

python/caffe/net_spec.py:104–119  ·  view source on GitHub ↗
(self, type_name, inputs, params)

Source from the content-addressed store, hash-verified

102 are Tops from other layers)."""
103
104 def __init__(self, type_name, inputs, params):
105 self.type_name = type_name
106 for index, input in enumerate(inputs):
107 if not isinstance(input, Top):
108 raise TypeError('%s input %d is not a Top (type is %s)' %
109 (type_name, index, type(input)))
110 self.inputs = inputs
111 self.params = params
112 self.ntop = self.params.get('ntop', 1)
113 # use del to make sure kwargs are not double-processed as layer params
114 if 'ntop' in self.params:
115 del self.params['ntop']
116 self.in_place = self.params.get('in_place', False)
117 if 'in_place' in self.params:
118 del self.params['in_place']
119 self.tops = tuple(Top(self, n) for n in range(self.ntop))
120
121 def _get_name(self, names, autonames):
122 if self not in names and self.ntop > 0:

Callers

nothing calls this directly

Calls 4

TopClass · 0.85
typeClass · 0.70
tupleFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected