Saver 에서 save 후, CheckpointVariables 변수 보기
인공지능,AI,학습,ML,Tensorflow, Cafee2,MLFlow/Tensorflow2) Traine 소스에서,
임포트후,
from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file
저장하고,
ckpt_path = saver.save(sess, 'saved1/train1')
출력하면
print_tensors_in_checkpoint_file(ckpt_path, all_tensors=True, tensor_name='', all_tensor_names=False)
결과가 나온다.
tensor_name: b_h1_3
[ 1.5395054e-03 0.0000000e+00 1.7294792e-02 -1.9801984e-05
-3.9077952e-04 1.9007076e-07 2.1687772e-02 1.2043750e-05
2.5410240e-04 0.0000000e+00]
PS) print_tensors_in_checkpoint_file 파라미터 설명
file_name
: not a physical file, just the prefix of filenames
If no tensor_name
is provided, prints the tensor names and shapes in the checkpoint file. If tensor_name
is provided, prints the content of the tensor.(inspect_checkpoint.py)
If all_tensor_names
is True
, Prints all the tensor names
If all_tensor
is 'True`, Prints all the tensor names and the corresponding content.
N.B. all_tensor
and all_tensor_names
will override tensor_name
'인공지능,AI,학습,ML,Tensorflow, Cafee2,MLFlow > Tensorflow' 카테고리의 다른 글
AttributeError: 'module' object has no attribute 'pack' (0) | 2019.03.30 |
---|---|
NotFoundError: Key ... not found in checkpoint (0) | 2019.03.26 |
Linear regresision, Logistic (0) | 2018.06.11 |
MNST-input data 로 기본적 트레이닝 테스트 (0) | 2018.06.11 |
트레이닝 샘플 (0) | 2018.06.11 |