Extracting weights values from a tensorflow model checkpoint

前端 未结 1 863
青春惊慌失措
青春惊慌失措 2021-01-14 05:13

I am training a model in tensorflow and I am doing checkpoints for my model. I the Checkpoints directory, I have four files namely,

  • checkpo
相关标签:
1条回答
  • 2021-01-14 05:53

    You are restoring in a wrong way

    saver.restore(sess, 'model.cpkt-0')
    # get the graph
    g = tf.get_default_graph()
    w1 = g.get_tensor_by_name('some_variable_name as per your definition in the model')
    
    0 讨论(0)
提交回复
热议问题