Problem: sum of class instances when downgrading to python 2.7
Offen
- Vorherrschende Sprache
- Python
- Sterne
- 1.5k
- Forks
- 668
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.