Skip to content

how to save a model? #4

@xinbeibei

Description

@xinbeibei

Hi,

Thanks for your beautiful code for distributed computation! Could you please share how to save a checkpoint/model? I tried to use the following but it does not work. Thank you in advance!

saver = tf.train.Saver(tf.all_variables(), max_to_keep=1000)
if (epoch+1) % 10 == 0:
with tf.device("/job:worker/task:5"):
checkpoint_path = os.path.join(outdir + '/model.ckpt')
saver.save(sess, checkpoint_path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions