XMUNLP/Tagger

Decoding seems to be reloading the model...?

huihuifan opened this issue · 2 comments

I'm using the provided command to generate outputs, the one in the section under "decoding." I have a few questions:

  1. It continuously prints things like:
2018-05-14 16:51:35.363220: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1306] Adding visible gpu devices: 0
INFO:tensorflow:Restoring parameters from models/conll05/single/checkpoint/model.ckpt-540432
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:tensorflow:Graph was finalized.

why doesn't it restore parameters and figure out which GPUs are visible just once? Is the model being loaded every single iteration?

  1. Is there any way I can see how much of the input file it has now decoded? It doesn't seem to write the output until the very end.

Thanks!

Sorry for the late reply.

  1. The reloading problem is caused by the old API of tf.contrib.learn.Estimator. It can be replaced with tf.estimator.Estimator which do not have this problem. However, some codes must be modified.
  2. You can count how many inputs have been processed by simply adding a few lines of code.

What do you mean by "some codes must be modified"?