2017-09-08 2 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 

첫 번째 방법 :

예를 들어

, 나는 세 개의 파일이 아무것도 표시하지 않음 :

,363,210
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. 

두 번째 방법 :

내가 백엔드 방법 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 이름 없음 영업 이익 :

답변

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 가중치를 볼 수 있습니까 @ Jie – Amir

관련 문제