Skip to content

Bind compute dims

Cyril Moineau requested to merge BindComputeDims into main

Feature:

  • Allow to define the computation of output dimension using a python function

Usage:

import aidge_core
w0 = aidge_core.Producer([25, 25], name="W0")
matmul0 = aidge_core.GenericOperator("MatMul", 1, 1, 1, name="MatMul0")
graph_view = aidge_core.sequential([w0, matmul0])
def myComputationMethod(a):
    print(a)
    return a
matmul0.get_operator().set_compute_output_dims(myComputationMethod)
matmul0.get_operator().compute_output_dims()
  • Add identity function to the binding. usefull ? (equivalent to lambda x:x```which is shorter than aidge_core.GenericOperatorOp.identity``...)
  • Add unittest
Edited by Cyril Moineau

Merge request reports