Skip to content
Snippets Groups Projects

Resolve "Bad MetaOp attributes"

Merged Maxence Naud requested to merge fix_208-bad-metaop-attributes into dev
All threads resolved!

Context

Closes #208 (closed)

Now the interface is:

>>> import aidge_core as ai
>>> import aidge_onnx
>>> import aidge_backend_cpu
>>>
>>> op = ai.PaddedConv2DOp([3,3], padding_dims=[1,1,1,1])
>>>
>>> op.attr
AttrDict({'Conv2D_0': AttrDict({'stride_dims': [1, 1], 'dilation_dims': [1, 1], 'kernel_dims': [3, 3]}), 'Pad2D_0': AttrDict({'begin_end_borders': [1, 1, 1, 1], 'border_type': <pad_border_type.Constant: 0>, 'border_value': 0.0})})
>>>
>>> op.attr.Conv2D_0
AttrDict({'stride_dims': [1, 1], 'dilation_dims': [1, 1], 'kernel_dims': [3, 3]})
>>>
>>> val = op.attr.Conv2D_0.dilation_dims
>>> val
[1, 1]

Since the attribute list is created at the construction of the MetaOperator, it cannot be updated with new nodes, but its values are still updated automatically.

The access time is much lower since the list is not created each time an element needs to be accessed.

Modified files

Detailed major modifications

Edited by Maxence Naud

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Maxence Naud marked this merge request as ready

    marked this merge request as ready

  • Maxence Naud resolved all threads

    resolved all threads

  • Maxence Naud changed the description

    changed the description

  • Maxence Naud added 9 commits

    added 9 commits

    Compare with previous version

  • Maxence Naud enabled an automatic merge when all merge checks for 819554a1 pass

    enabled an automatic merge when all merge checks for 819554a1 pass

  • Maxence Naud mentioned in commit f43905b6

    mentioned in commit f43905b6

  • merged

  • Please register or sign in to reply
    Loading