Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and load Model #166

Open
harispervaiz opened this issue Jul 12, 2021 · 1 comment
Open

Save and load Model #166

harispervaiz opened this issue Jul 12, 2021 · 1 comment

Comments

@harispervaiz
Copy link

harispervaiz commented Jul 12, 2021

Hello,

I have been saving my model via :

    save_path = saver.save(sess, model_path + model_name)
    print("Model saved in path: %s" % save_path)

But when it comes to restoring model :

saver = tf.compat.v1.train.Saver()

saver = tf.compat.v1.train.import_meta_graph(model_path + '/model.meta')
saver.restore(sess, tf.train.latest_checkpoint(model_path + '/'))

It restores but when i try to run it, it gives me following error:

Input to reshape is a tensor with 646076700 values, but the requested shape has 371140200

Help is much appreciated, maybe the way i am saving is wrong

Looking forward to hear back

@sam-lev
Copy link

sam-lev commented Jul 12, 2021

I have had this same problem and would be very curious to hear a resolution. The issue is the state graph and adjacent matrix are initialized to the original run, did you change anything such as batch size or max degree of sampled neighbors. This would affect it. Ultimately all placeholders and the adjacency matrix created in minibatch need to be identical, so maybe your problem setting would allow you to keep those attributes the same. Changing the structure of the graph being learned/inferred, however, is much more difficult. For reference see this post. Unfortunately, I have had no response but the post does link to other similar posts.
original issue #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants