def store_to_attr(self, attr, graph_item):
""" Make a graph item (variable or operation) accessible as a model attribute """
with self.graph.as_default():
setattr(self, attr, graph_item)
self._attrs.append(attr)
tf.get_collection_ref('attrs').append(graph_item)
评论列表
文章目录