Skip to content
Snippets Groups Projects
Commit 46f004c9 authored by jan.middendorf@rwth-aachen.de's avatar jan.middendorf@rwth-aachen.de
Browse files

Python 3 compatibility

parent b3c6e706
No related branches found
No related tags found
No related merge requests found
from itertools import izip
#from itertools import izip
from collections import OrderedDict, defaultdict
import fnmatch
import numpy as np
......@@ -7,12 +7,12 @@ from tqdm import tqdm
from inspect import getargspec
from warnings import warn
import re
from tensorflow.python.keras.engine.training_utils import make_logs
#from tensorflow.python.keras.engine.training_utils import make_logs
from tensorflow.python.keras.backend import track_variable
from operator import itemgetter
from evil import pin
from data import SKDict, DSS
from .evil import pin
from .data import SKDict, DSS
# various helper functions
......@@ -188,7 +188,7 @@ class Moment2Std(tf.keras.callbacks.Callback):
def on_x_end(self, x, logs=None):
if logs is None:
return
for key1, mom1 in logs.items():
for key1, mom1 in list(logs.items()):
if not key1.endswith(self.mom1):
continue
prefix = key1[:-len(self.mom1)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment