def assign(self, value_list):
if isinstance(value_list, ZMergedMatrix):
value_list = value_list.components
assert len(value_list) == len(self.components), 'the length of value_list and of z, components must coincide'
value_list = tf.tuple(value_list) # THIS PROBABLY SOLVES THE PROBLEM!
ao1 = [tf.assign(c, v) for c, v in zip(self.components, value_list)]
return tf.group(*ao1)
# noinspection PyUnusedLocal
评论列表
文章目录