bi-att-flow icon indicating copy to clipboard operation
bi-att-flow copied to clipboard

Problem: sum of class instances when downgrading to python 2.7

Open nijianmo opened this issue 6 years ago • 0 comments

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!

nijianmo avatar Aug 03 '17 23:08 nijianmo