Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion conv_net_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def errors(self, y):
# check if y has same dimension of y_pred
if y.ndim != self.y_pred.ndim:
raise TypeError('y should have the same shape as self.y_pred',
('y', target.type, 'y_pred', self.y_pred.type))
('y', y.type, 'y_pred', self.y_pred.type))
# check if y is of the correct datatype
if y.dtype.startswith('int'):
# the T.neq operator returns a vector of 0s and 1s, where 1
Expand Down
2 changes: 1 addition & 1 deletion conv_net_sentence.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def train_conv_net(datasets,
index = T.lscalar()
x = T.matrix('x')
y = T.ivector('y')
Words = theano.shared(value = U, name = "Words")
Words = theano.shared(value = np.asarray(U, dtype=theano.config.floatX), name = "Words")
zero_vec_tensor = T.vector()
zero_vec = np.zeros(img_w)
set_zero = theano.function([zero_vec_tensor], updates=[(Words, T.set_subtensor(Words[0,:], zero_vec_tensor))], allow_input_downcast=True)
Expand Down