TensorFlow - Dışa aktarılıyor

Burada, TensorFlow'daki MetaGraph oluşumuna odaklanacağız. Bu, TensorFlow'daki dışa aktarma modülünü anlamamıza yardımcı olacaktır. MetaGraph, eğitmek, değerlendirme yapmak veya önceden eğitilmiş bir grafik üzerinde çıkarım yapmak için gereken temel bilgileri içerir.

Aynı kod parçacığı aşağıdadır -

def export_meta_graph(filename = None, collection_list = None, as_text = False): 
   """this code writes `MetaGraphDef` to save_path/filename. 
   
   Arguments: 
   filename: Optional meta_graph filename including the path. collection_list: 
      List of string keys to collect. as_text: If `True`, 
      writes the meta_graph as an ASCII proto. 
   
   Returns: 
   A `MetaGraphDef` proto. """

Aynısı için tipik kullanım modellerinden biri aşağıda belirtilmiştir -

# Build the model ... 
with tf.Session() as sess: 
   # Use the model ... 
# Export the model to /tmp/my-model.meta. 
meta_graph_def = tf.train.export_meta_graph(filename = '/tmp/my-model.meta')