bi-att-flow
bi-att-flow copied to clipboard
Problem: sum of class instances when downgrading to python 2.7
Hi all, I'm trying to downgrade the code into python 2.7. I found in the customized evaluation class overloaded the add operation as: def add(self, other).
When sum over evaluation instances of different batches, it simply use a sum command: def get_evaluation_from_batches(self, sess, batches): e = sum(self.get_evaluation(sess, batch) for batch in batches) The sum inherits the overloaded sum operation well in python 3.5 whereas it does not work in python 2.7.
Does any one meet the same problem and find some solutions? Any suggestion would be appreciated. Thanks!