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

usage of 'range' in 'reduce_max' and 'reduce_sum' needs to be debugged #11

Open
roomo7time opened this issue Sep 6, 2018 · 3 comments

Comments

@roomo7time
Copy link

vat_tf/vat.py

Line 34 in c5125d2

d /= (1e-12 + tf.reduce_max(tf.abs(d), range(1, len(d.get_shape())), keep_dims=True))

In tensorflow (1.8>) with python 3, this line does not seem to work. It seems range needs to be wrapped by 'list'.

@roomo7time roomo7time changed the title needs to be debugged usage of needs to be debugged Sep 6, 2018
@roomo7time roomo7time changed the title usage of needs to be debugged usage of 'range' in 'reduce_max' and 'reduce_sum' needs to be debugged Sep 6, 2018
@marcosly
Copy link

vat_tf/vat.py

Line 34 in c5125d2

d /= (1e-12 + tf.reduce_max(tf.abs(d), range(1, len(d.get_shape())), keep_dims=True))
In tensorflow (1.8>) with python 3, this line does not seem to work. It seems range needs to be wrapped by 'list'.

did you fix the bug?

@seansaito
Copy link

Dictionary operations should be fixed as well:

for key, _ in losses_eval_train.iteritems():

iteritems() should be changed to items(). Also values() in the lines below should be wrapped in list() as well.

@SiyuWang15
Copy link

I used
[i for i in range(1, len(d.get_shape())]
to replace it and worked well

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