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

The examples of ‘semi_supervised_vae’ cannot run successfully #126

Open
SyDudulu opened this issue Dec 11, 2019 · 1 comment
Open

The examples of ‘semi_supervised_vae’ cannot run successfully #126

SyDudulu opened this issue Dec 11, 2019 · 1 comment

Comments

@SyDudulu
Copy link

There seems to be some little bugs in these examples. For example
for t in range(iters): labeled_indices = (np.random.randint(0, n_labeled, size=batch_size)) x_labeled_batch = x_labeled[labeled_indices]

It throws the error that
TypeError: Only integers, slices (:), ellipsis (...), tf.newaxis (None) and scalar tf.int32/tf.int64 tensors are valid indices, got array([17, 13, 15, 32, 80, 63, 47, 90, 90, 15, 23, 75, 51, 82, 10, 77, 5, 56, 54, 4, 63, 21, 11, 82, 36, 46, 85, 59, 38, 28, 40, 8, 28, 56, 56, 28, 25, 56, 75, 39, 52, 12, 18, 24, 22, 61, 93, 74, 18, 39, 97, 84, 67, 70, 20, 83, 90, 10, 1, 4, 63, 13, 19, 98, 65, 74, 82, 39, 54, 79, 92, 19, 6, 56, 82, 20, 61, 82, 88, 85, 9, 80, 40, 6, 21, 85, 8, 74, 78, 23, 27, 72, 37, 31, 20, 76, 97, 91, 87, 25])
in in line 154, in main
labeled_indices = (np.random.randint(0, n_labeled, size=batch_size))

And I use
labeled_indices = (np.random.randint(0, n_labeled, size=batch_size)).tolist()
It throws the error that
ValueError: Value out of range: 1267650600228229401496703205375
in line 155, in main
x_labeled_batch = x_labeled[labeled_indices]

@csy530216
Copy link
Collaborator

csy530216 commented Jan 9, 2020

Hello!
Sorry for the very late reply. The issue is fixed as in #127. Thank you for your comment!

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