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

Class Layers

python/caffe/net_spec.py:199–213  ·  view source on GitHub ↗

A Layers object is a pseudo-module which generates functions that specify layers; e.g., Layers().Convolution(bottom, kernel_size=3) will produce a Top specifying a 3x3 convolution applied to bottom.

Source from the content-addressed store, hash-verified

197
198
199class Layers(object):
200 """A Layers object is a pseudo-module which generates functions that specify
201 layers; e.g., Layers().Convolution(bottom, kernel_size=3) will produce a Top
202 specifying a 3x3 convolution applied to bottom."""
203
204 def __getattr__(self, name):
205 def layer_fn(*args, **kwargs):
206 fn = Function(name, args, kwargs)
207 if fn.ntop == 0:
208 return fn
209 elif fn.ntop == 1:
210 return fn.tops[0]
211 else:
212 return fn.tops
213 return layer_fn
214
215
216class Parameters(object):

Callers 1

net_spec.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected