是否存在来自沉降片类的大量对象的条件?

时间:2018-12-25 02:32:15

标签: scala apache-flink flink-streaming

在这种情况下,它创建了约30000个沉没器类实例,是否有某些原因?沉降片的平行度为16。

代码为:

def initialize_uninitialized_variables(sess):
    with tf.name_scope('initialize_uninits'):
        uninit_vars = []
        uninit_tensors = []
        for var in tf.global_variables():
            uninit_vars.append(var)
            uninit_tensors.append(tf.is_variable_initialized(var))
        uninit_bools = sess.run(uninit_tensors)
        uninit = zip(uninit_bools, uninit_vars)
        uninit = [var for init, var in uninit if not init]
        init_op = tf.variables_initializer(uninit)
        sess.run(init_op)

0 个答案:

没有答案