Skip to content

Commit

Permalink
Fix the exercies so that the solutions actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Jan 31, 2017
1 parent 4e3eee3 commit 4adc851
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 06_scalmulop/01_scalmulop_soln.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from theano import Op, Apply
from theano.tensor import as_tensor_variable
from theano.scalar import as_scalar_variable
from theano.scalar import as_scalar

class ScalMulV1(Op):
__props__ = ('scal',)
Expand All @@ -25,7 +25,7 @@ class ScalMulV2(Op):

def make_node(self, x, scal):
x = as_tensor_variable(x)
scal = as_scalar_variable(scal)
scal = as_scalar(scal)
return Apply(self, [x, scal], [x.type()])

def perform(self, node, inputs, output_storage):
Expand Down
1 change: 0 additions & 1 deletion 07_scalmulgrad/01_scalmulop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from theano import Op, Apply
from theano.tensor import as_tensor_variable
from theano.scalar import as_scalar_variable

class ScalMul(Op):
__props__ = ('scal',)
Expand Down
1 change: 0 additions & 1 deletion 07_scalmulgrad/01_scalmulop_soln.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from theano import Op, Apply
from theano.tensor import as_tensor_variable
from theano.scalar import as_scalar_variable

class ScalMul(Op):
__props__ = ('scal',)
Expand Down

0 comments on commit 4adc851

Please sign in to comment.