Skip to content

Commit

Permalink
Suppressing the theano warning until Lasagne gets updated. Displaying…
Browse files Browse the repository at this point in the history
… device used in preamble.
  • Loading branch information
alexjc committed Mar 10, 2016
1 parent 3547a6d commit b5cb739
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import bz2
import pickle
import argparse
import warnings


# Configure all options first so we can custom load other libraries (Theano) based on device specified by user.
Expand Down Expand Up @@ -55,7 +56,6 @@ class ansi:

print('{}Neural Doodle for semantic style transfer.{}'.format(ansi.CYAN_B, ansi.ENDC))


# Load the underlying deep learning libraries based on the device specified. If you specify THEANO_FLAGS manually,
# the code assumes you know what you are doing and they are not overriden!
os.environ.setdefault('THEANO_FLAGS', 'device=%s,force_device=True,floatX=float32,print_active_device=False' % (args.device))
Expand All @@ -71,10 +71,16 @@ class ansi:
import theano.tensor.nnet.neighbours

# Deep Learning Framework
import lasagne
with warnings.catch_warnings():
# suppress: "downsample module has been moved to the pool module."
warnings.simplefilter("ignore")
import lasagne

from lasagne.layers import Conv2DLayer as ConvLayer, Pool2DLayer as PoolLayer
from lasagne.layers import InputLayer, ConcatLayer

print('{} - Using device `{}` for processing the image.{}'.format(ansi.CYAN, theano.config.device, ansi.ENDC))


#----------------------------------------------------------------------------------------------------------------------
# Convolutional Neural Network
Expand Down

0 comments on commit b5cb739

Please sign in to comment.