Note, that it is without branching, because TF does not support an empty list as an inputs argument and throws an exception in this case:
Traceback (most recent call last):
File "./test.py", line 14, in <module>
result = testnet_add_n()
File "./test.py", line 8, in testnet_add_n
return tf.add_n([])
File "/nix/store/x20b4bb14jsia0nx3ksjcb3n37fdhxzm-python3-3.7.9-env/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/nix/store/x20b4bb14jsia0nx3ksjcb3n37fdhxzm-python3-3.7.9-env/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py", line 2869, in add_n
raise ValueError("inputs must be a list of at least one "
ValueError: inputs must be a list of at least one Tensor/IndexedSlices with the same dtype and shape
I am trying to save and to convert a simple tensorflow network:
with such commands:
but the conversion fails with this message:
I think that a converter transform expression for
AddN
TF function to NNEF add_n should be something like this:Note, that it is without branching, because TF does not support an empty list as an
inputs
argument and throws an exception in this case: