MCPcopy
hub / github.com/OpenPPL/ppq / set_attr

Method set_attr

ppq/parser/caffe/caffe_export_utils.py:221–226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

219@register_class
220class Softmax(CaffeOpExporter):
221 def set_attr(self):
222 axis = refine_value(self.op.attributes.get('axis', -1))
223 if not (axis == -1 or axis == len(self.op.inputs[0].shape) - 1):
224 logger.warning(f'Converting to caffe Softmax, the axis={axis}, which is not the last axis. '
225 'This may result to incorrect caffe model')
226 self.layer.softmax_param.axis = axis
227
228
229@register_class

Callers

nothing calls this directly

Calls 2

refine_valueFunction · 0.85
warningMethod · 0.80

Tested by

no test coverage detected