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

Print predicted tensor error - TypeError: '>' not supported between instances of 'int' and 'str' #902

Open
Noahyt opened this issue Sep 11, 2017 · 1 comment

Comments

@Noahyt
Copy link

Noahyt commented Sep 11, 2017

I have trained a network that predicts 16 values (regression). The output should be a tensor which is (n,16) where n is the number of submitted examples. I have confirmed that the network is working as expected. However, I cannot directly print the values that the network predicts. The code I am running is:


generated_1 = model.predict(testing_x)

## error if print(generated_1)

generated_1 = np.array(generated_phase_1)

## error if print(generated_1)

print(generated_phase_1.shape)

## no error, correctly prints expected tensor shape

generated_1 = generated_1[0]

## error if print(generated_1)

The error that is generated is the same at all points I have marked in the above code:

"TypeError: '>' not supported between instances of 'int' and 'str'"

@Noahyt
Copy link
Author

Noahyt commented Sep 11, 2017

I solved my own problem. It also appears more general than I thought so I do not think that it is a tflearn bug, but actually something to do with numpy print options. Just in case anyone encounters a similar error, I commented out the following line and resolved the error

np.set_printoptions(threshold='nan')

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

1 participant