7
큰 행렬이 있습니다.Tensorflow에서 분할 변수를 저장하고 복원하는 방법
나는이 변수를 샤드의 수로 생성합니다.
model/softmax_w/part_0:0 (99184, 512) /cpu:0
model/softmax_w/part_1:0 (99184, 512) /cpu:0
model/softmax_w/part_2:0 (99184, 512) /cpu:0
model/softmax_w/part_3:0 (99184, 512) /cpu:0
model/softmax_w/part_4:0 (99184, 512) /cpu:0
model/softmax_w/part_5:0 (99184, 512) /cpu:0
model/softmax_w/part_6:0 (99183, 512) /cpu:0
model/softmax_w/part_7:0 (99183, 512) /cpu:0
내가 할 수있는 훈련을하고 그것에게 성공을 저장합니다
softmax_w = tf.get_variable("softmax_w", [hps.vocab_size, hps.projected_size],
partitioner=tf.fixed_size_partitioner(hps.num_shards, 0))
로그를 생성합니다. 그러나 모델을 복원하려고하면이 오류가 발생합니다.
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_7 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_6 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_5 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_4 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_3 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_2 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_1 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_0 not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:975] Not found: Key model/softmax_w/part_7 not found in checkpoint
나는 변수를 부품으로 저장합니다. 저장된 매개 변수는 단지 softmax_w
입니다. 더 이상 분할 된 변수가 아닙니다.