MCPcopy Create free account
hub / github.com/apache/singa / _has_layer_param

Method _has_layer_param

python/singa/layer.py:207–220  ·  view source on GitHub ↗

Determine whether names contains parameter names in the layer Args: layer(Layer): the layer instance names(list): the list of parameter names Returns: boolean: whether names contains parameter names in that layer

(self, layer, names)

Source from the content-addressed store, hash-verified

205 x_device.EnableGraph(prev_state)
206
207 def _has_layer_param(self, layer, names):
208 """ Determine whether names contains parameter names in the layer
209
210 Args:
211 layer(Layer): the layer instance
212 names(list): the list of parameter names
213
214 Returns:
215 boolean: whether names contains parameter names in that layer
216 """
217 for name in names:
218 if name.startswith(layer.name):
219 return True
220 return False
221
222 def _get_name_prefix(self):
223 """ Get the name prefix

Callers 2

set_paramsMethod · 0.95
set_statesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected