Skip to content

Instantly share code, notes, and snippets.

@kedarbellare
Created December 13, 2016 08:40
Show Gist options
  • Save kedarbellare/06b462394f012c446b5c151544d0465a to your computer and use it in GitHub Desktop.
Save kedarbellare/06b462394f012c446b5c151544d0465a to your computer and use it in GitHub Desktop.
import sys
# HACK: keras prints to stdout which messes with halite
stdout = sys.stdout
stderr = sys.stderr
sys.stdout = open('/dev/null', 'w')
sys.stderr = open('/dev/null', 'w')
from keras import models
from keras.callbacks import ModelCheckpoint
from keras.models import Sequential, model_from_yaml
from keras.layers import Dense, Activation, \
Convolution1D, Convolution2D, Dropout, Flatten
from keras.optimizers import SGD, RMSprop, Nadam, Adam
from keras.utils import np_utils
sys.stdout = stdout
sys.stderr = stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment