Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions network3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,11 +49,11 @@ def ReLU(z): return T.maximum(0.0, z)


#### Constants
GPU = True
GPU = False
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:
Expand Down Expand Up @@ -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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image_shape should be input_shape

pooled_out = pool_2d(
Expand Down