StoryCode

NotFoundError: Key ... not found in checkpoint

인공지능,AI,학습,ML,Tensorflow, Cafee2,MLFlow/Tensorflow
반응형

오류 상황) 변수를 저장후 출력해보면, 변수명 끝에 _1 이 붙는다.

실행을 한 번더 하면 _2 가 된다.


해결) 커널 리스타트 를 해야 한다. 중간부터 다시 실행하면 "오류상황" 과 같은 문제가 발생한다.

쥬피터에서는 동그란 화살표의 Restart 버튼을 클릭하면 된다.

반응형

Saver 에서 save 후, CheckpointVariables 변수 보기

인공지능,AI,학습,ML,Tensorflow, Cafee2,MLFlow/Tensorflow
반응형

1) 아래 소스 추가


inspect_checkpoint.py


2) 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

반응형

Dia ( Like Visio )

Latex
반응형

0. 무료


1.SVG, 몇가지 이미지 대표 이미지 포맷들


2. C++ , 파이썬 코드 생성 가능


3. https://wiki.gnome.org/Apps/Dia

반응형

'Latex' 카테고리의 다른 글

InkScape  (0) 2019.02.25
LaTexDraw  (0) 2019.02.25
설치  (0) 2019.02.22