vat_tf
vat_tf copied to clipboard
usage of 'range' in 'reduce_max' and 'reduce_sum' needs to be debugged
https://github.com/takerum/vat_tf/blob/c5125d267531ce0f10b2238cf95604d287de63c8/vat.py#L34
In tensorflow (1.8>) with python 3, this line does not seem to work. It seems range needs to be wrapped by 'list'.
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?
Dictionary operations should be fixed as well:
https://github.com/takerum/vat_tf/blob/c5125d267531ce0f10b2238cf95604d287de63c8/train_semisup.py#L180
iteritems()
should be changed to items()
. Also values()
in the lines below should be wrapped in list()
as well.
I used
[i for i in range(1, len(d.get_shape())]
to replace it and worked well