This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/theano/tensor/basic.py b/theano/tensor/basic.py | |
index 8f734e2..52327a6 100644 | |
--- a/theano/tensor/basic.py | |
+++ b/theano/tensor/basic.py | |
@@ -3804,6 +3804,202 @@ def vertical_stack(*args): | |
return concatenate(args, axis=0) | |
+class FixUnknownDimension(Op): | |
+ """Infer an unknown dimension indicated by `-1`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/theano/tensor/nnet/nnet.py b/theano/tensor/nnet/nnet.py | |
index 788213d..e468385 100644 | |
--- a/theano/tensor/nnet/nnet.py | |
+++ b/theano/tensor/nnet/nnet.py | |
@@ -1099,7 +1099,7 @@ class CrossentropySoftmax1HotWithBiasDx (gof.Op): | |
return [g_dy, g_sm, g_y_idx] | |
def c_code_cache_version(self): | |
- return (3,) | |
+ return (4,) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TemplateOp(theano.Op): | |
@property | |
def __impls__(self): | |
return {} | |
def __call__(self, *inputs, **kwargs): | |
tag = kwargs.pop('tag', None) | |
if tag is None: | |
return super(TemplateOp, self).__call__(*inputs, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import theano | |
import theano.tensor as T | |
import numpy as np | |
def step(b, a, x, t, W): | |
y = theano.dot(x[a:b], W) | |
y = theano.printing.Print()(y) | |
error = 0.5 * T.sqr(t[a:b] - y).sum() | |
return b, error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import theano | |
import theano.tensor as T | |
floatX = theano.config.floatX | |
def scan(y, dy_dw, w, x): | |
def step(dy_dw_, y_, w_, a_, *x_): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import theano | |
import theano.tensor as T | |
floatX = theano.config.floatX | |
def scan1(a, y, x=None): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import theano | |
import theano.tensor as T | |
floatX = theano.config.floatX | |
class GaussNewtonMatrix(object): | |
def __init__(self, s): |