How to checkwhether an index in a tensorarray has been initialized?
The only option as I see it is creating an initialization loop where every index is set to 0. This eliminates the problem but may not be an ideal way.
Is it in anyway possible to check whether an index in a TensorArray has been initialized?
As I understand TensorArrays can't be initialized with default values.
However I need a way to increment the number on that index which I try to do by reading it, adding one and then writing it to the same index.
If the index is not initialized however this will fail as it cannot read an uninitialized index.
So is there a way to check if it has been initialized and otherwise write a zero to initialize it?