diff --git a/network3.py b/network3.py index ff8afa8..07de43a 100644 --- a/network3.py +++ b/network3.py @@ -36,7 +36,7 @@ import numpy as np import theano import theano.tensor as T -from theano.tensor.nnet import conv +from theano.tensor.nnet import conv2d from theano.tensor.nnet import softmax from theano.tensor import shared_randomstreams from theano.tensor.signal.pool import pool_2d @@ -53,7 +53,7 @@ def ReLU(z): return T.maximum(0.0, z) if GPU: print("Trying to run under a GPU. If this is not desired, then modify "+\ "network3.py\nto set the GPU flag to False.") - try: theano.config.device = 'gpu' + try: theano.config.device = 'cuda' except: pass # it's already set theano.config.floatX = 'float32' else: @@ -224,7 +224,7 @@ def __init__(self, filter_shape, image_shape, poolsize=(2, 2), def set_inpt(self, inpt, inpt_dropout, mini_batch_size): self.inpt = inpt.reshape(self.image_shape) - conv_out = conv.conv2d( + conv_out = conv2d( input=self.inpt, filters=self.w, filter_shape=self.filter_shape, image_shape=self.image_shape) pooled_out = pool_2d(