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

InvalidArgumentError (see above for traceback): tensor_name = linear//weight #4

Open
tbdwworks opened this issue Jul 22, 2017 · 3 comments

Comments

@tbdwworks
Copy link

tbdwworks commented Jul 22, 2017

print ("Predicted %d, Label: %d" % (classifier.predict(test_data[0]), test_labels[0]))

the below error occurred.
InvalidArgumentError (see above for traceback): tensor_name = linear//weight; shape in shape_and_slice spec [1,10] does not match the shape stored in checkpoint: [784,10]
[[Node: save/RestoreV2_1 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_1/tensor_names, save/RestoreV2_1/shape_and_slices)]]

Although classifier.evaluate(test_data[0:1,:], test_labels[0:1]) is working..
{'accuracy': 1.0, 'global_step': 1000, 'loss': 0.010729363}

@sepulchered
Copy link

Same here.

@rzdulc
Copy link

rzdulc commented Aug 30, 2017

I got it to work like this:

prediction = classifier.predict(np.array([test_data[0]], dtype=float), as_iterable=False)
print("Predicted %d, Label: %d" % (prediction, test_labels[0]))

cseas added a commit to cseas/tutorials that referenced this issue Jul 15, 2018
cseas added a commit to cseas/tutorials that referenced this issue Jul 15, 2018
cseas added a commit to cseas/tutorials that referenced this issue Jul 15, 2018
cseas added a commit to cseas/tutorials that referenced this issue Jul 15, 2018
cseas added a commit to cseas/tutorials that referenced this issue Jul 15, 2018
Added newline for text wrapping issue after issue random-forests#4 fix
@pdhruv93
Copy link

pdhruv93 commented Sep 6, 2018

@drczuckerman ..works..thanks.

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

4 participants