2017-09-08 22 views
0

MobileNetのチェックポイントファイルから事前にトレーニングされたTF-Slimモデルをダウンロードしましたが、レイヤに関連付けられているウェイトを確認しようとしています。私は直接tensorboardを使用事前にトレーニングされたモデルのTensorflowチェックポイントファイルを復元する

tensorboard --logdir=${CHKPNT_DIR} 

それはローカル(http://127.0.0.1:6006/)を実行しますが、ありません

67903136 Jun 14 00:15 mobilenet_v1_1.0_224.ckpt.data-00000-of-00001 
19954 Jun 14 00:15 mobilenet_v1_1.0_224.ckpt.index 
4319476 Jun 14 00:15 mobilenet_v1_1.0_224.ckpt.meta 

まず方法:

例として

、私は3つのファイルを持っています何も表示しない:

No dashboards are active for the current data set. 
Probable causes: 

You haven’t written any data to your event files. 
TensorBoard can’t find your event files. 

第2の方法:

私はバックエンドのメソッドEvent_Accumulator使用:

興味深いことに
import tensorflow as tf 
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator 
event_acc = EventAccumulator('${CHKPNT_DIR}') 
event_acc.Reload() 

# Show all tags in the log file 
print(event_acc.Tags()) 

を、すべてのタグが空である:

{'scalars': [], 'histograms': [], 'meta_graph': False, 'images': [], 'graph': False, 'audio': [], 'distributions': [], 'tensors': [], 'run_metadata': []} 

だから、これはdirです:

>>>dir(event_acc) 
['Audio', 'CompressedHistograms', 'FirstEventTimestamp', 'Graph', 'Histograms', 'Images', 'MetaGraph', 'PluginAssets', 'PluginTagToContent', 'Reload', 'RetrievePluginAsset', 'RunMetadata', 'Scalars', 'SummaryMetadata', 'Tags', 'Tensors', '_CheckForOutOfOrderStepAndMaybePurge', '_CheckForRestartAndMaybePurge', '_CompressHistogram', '_ConvertHistogramProtoToTuple', '_MaybePurgeOrphanedData', '_ProcessAudio', '_ProcessEvent', '_ProcessHistogram', '_ProcessImage', '_ProcessScalar', '_ProcessTensor', '_Purge', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_compression_bps', '_first_event_timestamp', '_generator', '_generator_mutex', '_graph', '_graph_from_metagraph', '_meta_graph', '_plugin_to_tag_to_content', '_tagged_metadata', '_tensor_summaries', 'accumulated_attrs', 'audios', 'compressed_histograms', 'file_version', 'histograms', 'images', 'most_recent_step', 'most_recent_wall_time', 'path', 'purge_orphaned_data', 'scalars', 'summary_metadata', 'tensors'] 

次に、事前に訓練されたネットワークはどのように見えるのですか?これらのチェックポイントファイルには、ある種のGoogle Protobufデータが含まれている必要があります。

TF 1.3.0Mac OS 10.12.4で実行しています。 `とValueError:これは一般的な問題のようですoperations.`定義された中でSSTableReaderV2の名前はありませんOP:

答えて

0
saver = tf.train.import_meta_graph("path/your/meta/file") 
saver.restore("path/to/data/file") 

graph = tf.get_default_graph() 
writer = tf.summary.FileWriter("path/to/write/graph") 
writer.add_graph(graph) 

はその後

tensorboard --logdir="path/to/write/graph" 
+0

は、私は次のエラーが表示されhttps://github.com/tensorflow/モデル/問題/ 1564あなたは重量を見ることができます@ジー – Amir

関連する問題