I'm trying to find variables that end in train_step
from tf.report_uninitialized_variables(),
but you can't iterate over tensors without eager execution.
I get that you need to use tf.map_fn,
but I do not understand it well enough.
This is what I have:
variables = []
for s, t in zip(tf.report_uninitialized_variables().eval(session=sess),
tf.report_uninitialized_variables()):
if 'train_step' in s:
variables.append(t)
train_step_init = tf.variables_initializer(variables, name='train_step_init')