Skip to content

Instantly share code, notes, and snippets.

@droid666
droid666 / test2.py
Created January 29, 2017 19:23
Keras thread bug example: tried hacks at line 134-143, no success
import numpy as np
import math
# fix random seed to have determinism
seed = 7
np.random.seed(seed)
import argparse
argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
@droid666
droid666 / test.py
Last active January 29, 2017 19:05
Check keras models performance with multiple threads, processes or sequencial (remove comments in final method to use all, commented to show keras bug)
import numpy as np
import math
# fix random seed to have determinism
seed = 7
np.random.seed(seed)
import argparse
argparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)