Search code examples
pythoncntk

ReconcileDynamicAxis (reconcile_dynamic_axis) in CNTK 2.0 Python API


CNTK Brainscript provides function ReconcileDynamicAxis for dealing with multiple dynamic axes (e.g. multiple sequence inputs of different size). I didn't find any official documentation about similar Python API. Finally, following some code available on CNTK github, I figured out a way to use it:

from _cntk_py import reconcile_dynamic_axis [...] reconciled_vector_A = typemap(reconcile_dynamic_axis)(vector_A, vector_B)

...it seems to work, but it looks like it's some internal CNTK function and possibly wasn't intended for public use.

Is there a public API version of reconcile_dynamic_axis and if not, what is the recommended way of dealing with multiple dynamic axes in Python API?


Solution

  • You can use sequence.broadcast_as if you just want to convert non-sequence to sequence.