|
|
6acf609 |
--- theano/compile/builders.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/compile/builders.py 2019-08-22 13:25:53.896813593 -0600
|
|
|
6acf609 |
@@ -15,7 +15,7 @@ from theano.gradient import Disconnected
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class OpFromGraph(gof.Op):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
This creates an ``Op`` from inputs and outputs lists of variables.
|
|
|
6acf609 |
The signature is similar to :func:`theano.function <theano.function>`
|
|
|
6acf609 |
and the resulting ``Op``'s perform will do the same operation as::
|
|
|
6acf609 |
--- theano/compile/function.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/compile/function.py 2019-08-22 13:33:40.346557969 -0600
|
|
|
6acf609 |
@@ -243,7 +243,7 @@ def function(inputs, outputs=None, mode=
|
|
|
6acf609 |
|
|
|
6acf609 |
if name is None:
|
|
|
6acf609 |
# Determine possible file names
|
|
|
6acf609 |
- source_file = re.sub('\.pyc?', '.py', __file__)
|
|
|
6acf609 |
+ source_file = re.sub(r'\.pyc?', '.py', __file__)
|
|
|
6acf609 |
compiled_file = source_file + 'c'
|
|
|
6acf609 |
|
|
|
6acf609 |
stack = tb.extract_stack()
|
|
|
6acf609 |
--- theano/configdefaults.py.orig 2019-08-23 08:49:26.259908947 -0600
|
|
|
6acf609 |
+++ theano/configdefaults.py 2019-08-23 08:50:57.173227993 -0600
|
|
|
6acf609 |
@@ -1614,7 +1614,7 @@ AddConfigVar("compiledir_format",
|
|
|
6acf609 |
|
|
|
6acf609 |
def default_compiledirname():
|
|
|
6acf609 |
formatted = theano.config.compiledir_format % compiledir_format_dict
|
|
|
6acf609 |
- safe = re.sub("[\(\)\s,]+", "_", formatted)
|
|
|
6acf609 |
+ safe = re.sub(r"[\(\)\s,]+", "_", formatted)
|
|
|
6acf609 |
return safe
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
--- theano/gof/op.py.orig 2019-08-22 16:26:01.760679539 -0600
|
|
|
6acf609 |
+++ theano/gof/op.py 2019-08-23 10:23:51.024394207 -0600
|
|
|
6acf609 |
@@ -280,13 +280,13 @@ class CLinkerOp(CLinkerObject):
|
|
|
6acf609 |
string is the name of a C variable pointing to that input.
|
|
|
6acf609 |
The type of the variable depends on the declared type of
|
|
|
6acf609 |
the input. There is a corresponding python variable that
|
|
|
6acf609 |
- can be accessed by prepending "py_" to the name in the
|
|
|
6acf609 |
+ can be accessed by prepending ```"py_"``` to the name in the
|
|
|
6acf609 |
list.
|
|
|
6acf609 |
outputs : list of strings
|
|
|
6acf609 |
Each string is the name of a C variable where the Op should
|
|
|
6acf609 |
store its output. The type depends on the declared type of
|
|
|
6acf609 |
the output. There is a corresponding python variable that
|
|
|
6acf609 |
- can be accessed by prepending "py_" to the name in the
|
|
|
6acf609 |
+ can be accessed by prepending ```"py_"``` to the name in the
|
|
|
6acf609 |
list. In some cases the outputs will be preallocated and
|
|
|
6acf609 |
the value of the variable may be pre-filled. The value for
|
|
|
6acf609 |
an unallocated output is type-dependent.
|
|
|
6acf609 |
@@ -343,13 +343,13 @@ class CLinkerOp(CLinkerObject):
|
|
|
6acf609 |
string is the name of a C variable pointing to that input.
|
|
|
6acf609 |
The type of the variable depends on the declared type of
|
|
|
6acf609 |
the input. There is a corresponding python variable that
|
|
|
6acf609 |
- can be accessed by prepending "py_" to the name in the
|
|
|
6acf609 |
+ can be accessed by prepending ```"py_"``` to the name in the
|
|
|
6acf609 |
list.
|
|
|
6acf609 |
outputs : list of strings
|
|
|
6acf609 |
Each string is the name of a C variable correspoinding to
|
|
|
6acf609 |
one of the outputs of the Op. The type depends on the
|
|
|
6acf609 |
declared type of the output. There is a corresponding
|
|
|
6acf609 |
- python variable that can be accessed by prepending "py_" to
|
|
|
6acf609 |
+ python variable that can be accessed by prepending ```"py_"``` to
|
|
|
6acf609 |
the name in the list.
|
|
|
6acf609 |
sub : dict of strings
|
|
|
6acf609 |
extra symbols defined in `CLinker` sub symbols (such as 'fail').
|
|
|
6acf609 |
@@ -784,7 +784,7 @@ class PureOp(object):
|
|
|
6acf609 |
folded when all its inputs are constant. This allows it to
|
|
|
6acf609 |
choose where it puts its memory/speed trade-off. Also, it
|
|
|
6acf609 |
could make things faster as constants can't be used for inplace
|
|
|
6acf609 |
- operations (see *IncSubtensor).
|
|
|
6acf609 |
+ operations (see *IncSubtensor*).
|
|
|
6acf609 |
|
|
|
6acf609 |
"""
|
|
|
6acf609 |
return True
|
|
|
6acf609 |
--- theano/gof/opt.py.orig 2019-08-22 14:06:43.820896086 -0600
|
|
|
6acf609 |
+++ theano/gof/opt.py 2019-08-23 08:50:57.175227956 -0600
|
|
|
6acf609 |
@@ -112,9 +112,9 @@ class Optimizer(object):
|
|
|
6acf609 |
|
|
|
6acf609 |
Add features to the fgraph that are required to apply the optimization.
|
|
|
6acf609 |
For example:
|
|
|
6acf609 |
- fgraph.attach_feature(History())
|
|
|
6acf609 |
- fgraph.attach_feature(MyFeature())
|
|
|
6acf609 |
- etc.
|
|
|
6acf609 |
+ fgraph.attach_feature(History())
|
|
|
6acf609 |
+ fgraph.attach_feature(MyFeature())
|
|
|
6acf609 |
+ etc.
|
|
|
6acf609 |
|
|
|
6acf609 |
"""
|
|
|
6acf609 |
pass
|
|
|
6acf609 |
--- theano/gof/unify.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/gof/unify.py 2019-08-22 13:24:58.420815328 -0600
|
|
|
6acf609 |
@@ -322,7 +322,7 @@ def unify_walk(a, b, U):
|
|
|
6acf609 |
|
|
|
6acf609 |
@comm_guard(OrVariable, NotVariable) # noqa
|
|
|
6acf609 |
def unify_walk(o, n, U):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
OrV(list1) == NV(list2) == OrV(list1 \ list2)
|
|
|
6acf609 |
|
|
|
6acf609 |
"""
|
|
|
6acf609 |
--- theano/gof/utils.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/gof/utils.py 2019-08-22 13:22:15.449758115 -0600
|
|
|
6acf609 |
@@ -307,7 +307,7 @@ def uniq(seq):
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def difference(seq1, seq2):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Returns all elements in seq1 which are not in seq2: i.e ``seq1\seq2``.
|
|
|
6acf609 |
|
|
|
6acf609 |
"""
|
|
|
6acf609 |
--- theano/gpuarray/fft.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/gpuarray/fft.py 2019-08-22 13:36:08.241971287 -0600
|
|
|
6acf609 |
@@ -283,7 +283,7 @@ cuirfft_op = CuIRFFTOp()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def curfft(inp, norm=None):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Performs the fast Fourier transform of a real-valued input on the GPU.
|
|
|
6acf609 |
|
|
|
6acf609 |
The input must be a real-valued float32 variable of dimensions (m, ..., n).
|
|
|
6acf609 |
@@ -317,7 +317,7 @@ def curfft(inp, norm=None):
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def cuirfft(inp, norm=None, is_odd=False):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Performs the inverse fast Fourier Transform with real-valued output on the GPU.
|
|
|
6acf609 |
|
|
|
6acf609 |
The input is a variable of dimensions (m, ..., n//2+1, 2) with
|
|
|
6acf609 |
--- theano/sandbox/linalg/ops.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/sandbox/linalg/ops.py 2019-08-22 13:37:11.588863356 -0600
|
|
|
6acf609 |
@@ -199,7 +199,7 @@ theano.compile.mode.optdb.register('Hint
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def psd(v):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Apply a hint that the variable `v` is positive semi-definite, i.e.
|
|
|
6acf609 |
it is a symmetric matrix and :math:`x^T A x \ge 0` for any vector x.
|
|
|
6acf609 |
|
|
|
6acf609 |
--- theano/sparse/basic.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/sparse/basic.py 2019-08-22 16:27:29.828134864 -0600
|
|
|
6acf609 |
@@ -4219,9 +4219,9 @@ class ConstructSparseFromList(gof.Op):
|
|
|
6acf609 |
This create a sparse matrix with the same shape as `x`. Its
|
|
|
6acf609 |
values are the rows of `values` moved. Pseudo-code::
|
|
|
6acf609 |
|
|
|
6acf609 |
- output = csc_matrix.zeros_like(x, dtype=values.dtype)
|
|
|
6acf609 |
- for in_idx, out_idx in enumerate(ilist):
|
|
|
6acf609 |
- output[out_idx] = values[in_idx]
|
|
|
6acf609 |
+ output = csc_matrix.zeros_like(x, dtype=values.dtype)
|
|
|
6acf609 |
+ for in_idx, out_idx in enumerate(ilist):
|
|
|
6acf609 |
+ output[out_idx] = values[in_idx]
|
|
|
6acf609 |
|
|
|
6acf609 |
"""
|
|
|
6acf609 |
x_ = theano.tensor.as_tensor_variable(x)
|
|
|
6acf609 |
--- theano/tensor/fft.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/fft.py 2019-08-22 13:36:23.986695912 -0600
|
|
|
6acf609 |
@@ -117,7 +117,7 @@ irfft_op = IRFFTOp()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def rfft(inp, norm=None):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Performs the fast Fourier transform of a real-valued input.
|
|
|
6acf609 |
|
|
|
6acf609 |
The input must be a real-valued variable of dimensions (m, ..., n).
|
|
|
6acf609 |
@@ -151,7 +151,7 @@ def rfft(inp, norm=None):
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def irfft(inp, norm=None, is_odd=False):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Performs the inverse fast Fourier Transform with real-valued output.
|
|
|
6acf609 |
|
|
|
6acf609 |
The input is a variable of dimensions (m, ..., n//2+1, 2)
|
|
|
6acf609 |
--- theano/tensor/nlinalg.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/nlinalg.py 2019-08-22 13:34:43.660450608 -0600
|
|
|
6acf609 |
@@ -75,7 +75,7 @@ pinv = MatrixPinv()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class MatrixInverse(Op):
|
|
|
6acf609 |
- """Computes the inverse of a matrix :math:`A`.
|
|
|
6acf609 |
+ r"""Computes the inverse of a matrix :math:`A`.
|
|
|
6acf609 |
|
|
|
6acf609 |
Given a square matrix :math:`A`, ``matrix_inverse`` returns a square
|
|
|
6acf609 |
matrix :math:`A_{inv}` such that the dot product :math:`A \cdot A_{inv}`
|
|
|
6acf609 |
@@ -149,7 +149,7 @@ matrix_inverse = MatrixInverse()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def matrix_dot(*args):
|
|
|
6acf609 |
- """ Shorthand for product between several dots.
|
|
|
6acf609 |
+ r""" Shorthand for product between several dots.
|
|
|
6acf609 |
|
|
|
6acf609 |
Given :math:`N` matrices :math:`A_0, A_1, .., A_N`, ``matrix_dot`` will
|
|
|
6acf609 |
generate the matrix product between all in the given order, namely
|
|
|
6acf609 |
--- theano/tensor/nnet/conv.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/nnet/conv.py 2019-08-22 13:35:27.978675488 -0600
|
|
|
6acf609 |
@@ -157,7 +157,7 @@ def conv2d(input, filters, image_shape=N
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class ConvOp(OpenMPOp):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
This Op serves a dual purpose: it can implement a vanilla 2D convolution
|
|
|
6acf609 |
(as taught in any signal processing class) or implement the
|
|
|
6acf609 |
convolutional layers found in Convolutional Neural Networks.
|
|
|
6acf609 |
--- theano/tensor/nnet/neighbours.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/nnet/neighbours.py 2019-08-22 13:36:36.213482065 -0600
|
|
|
6acf609 |
@@ -618,7 +618,7 @@ class Images2Neibs(Op):
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def images2neibs(ten4, neib_shape, neib_step=None, mode='valid'):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Function :func:`images2neibs <theano.tensor.nnet.neighbours.images2neibs>`
|
|
|
6acf609 |
allows to apply a sliding window operation to a tensor containing
|
|
|
6acf609 |
images or other two-dimensional objects.
|
|
|
6acf609 |
--- theano/tensor/nnet/nnet.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/nnet/nnet.py 2019-08-22 13:35:17.270862767 -0600
|
|
|
6acf609 |
@@ -409,7 +409,7 @@ softmax_grad = SoftmaxGrad()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class Softmax(gof.Op):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Softmax activation function
|
|
|
6acf609 |
:math:`\\varphi(\\mathbf{x})_j =
|
|
|
6acf609 |
\\frac{e^{\mathbf{x}_j}}{\sum_{k=1}^K e^{\mathbf{x}_k}}`
|
|
|
6acf609 |
@@ -600,7 +600,7 @@ softmax_op = Softmax()
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class LogSoftmax(gof.Op):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
LogSoftmax activation function
|
|
|
6acf609 |
:math:`\\varphi(\\mathbf{x})_j =
|
|
|
6acf609 |
\\e^{(\mathbf{x}_j - log{\sum_{k=1}^K e^{\mathbf{x}_k})}}
|
|
|
6acf609 |
@@ -1412,7 +1412,7 @@ crossentropy_categorical_1hot_grad = Cro
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class CrossentropyCategorical1Hot(gof.Op):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Compute the cross entropy between a coding distribution and
|
|
|
6acf609 |
a true distribution of the form [0, 0, ... 0, 1, 0, ..., 0].
|
|
|
6acf609 |
|
|
|
6acf609 |
@@ -2051,7 +2051,7 @@ def sigmoid_binary_crossentropy(output,
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
def categorical_crossentropy(coding_dist, true_dist):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Return the cross-entropy between an approximating distribution and a true
|
|
|
6acf609 |
distribution.
|
|
|
6acf609 |
|
|
|
6acf609 |
--- theano/tensor/opt.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/opt.py 2019-08-22 13:34:16.709921972 -0600
|
|
|
6acf609 |
@@ -4582,7 +4582,7 @@ register_canonicalize(gof.OpRemove(T.ten
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
class Canonizer(gof.LocalOptimizer):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Simplification tool. The variable is a local_optimizer. It is best used
|
|
|
6acf609 |
with a TopoOptimizer in in_to_out order.
|
|
|
6acf609 |
|
|
|
6acf609 |
@@ -4650,7 +4650,7 @@ class Canonizer(gof.LocalOptimizer):
|
|
|
6acf609 |
return [self.main, self.inverse, self.reciprocal]
|
|
|
6acf609 |
|
|
|
6acf609 |
def get_num_denum(self, input):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
This extract two lists, num and denum, such that the input is:
|
|
|
6acf609 |
self.inverse(self.main(\*num), self.main(\*denum)). It returns
|
|
|
6acf609 |
the two lists in a (num, denum) pair.
|
|
|
6acf609 |
@@ -4751,7 +4751,7 @@ class Canonizer(gof.LocalOptimizer):
|
|
|
6acf609 |
return num, denum
|
|
|
6acf609 |
|
|
|
6acf609 |
def merge_num_denum(self, num, denum):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Utility function which takes two lists, num and denum, and
|
|
|
6acf609 |
returns something which is equivalent to inverse(main(\*num),
|
|
|
6acf609 |
main(\*denum)), but depends on the length of num and the length
|
|
|
6acf609 |
--- theano/tensor/slinalg.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/slinalg.py 2019-08-22 13:36:53.541179005 -0600
|
|
|
6acf609 |
@@ -266,7 +266,7 @@ class Solve(Op):
|
|
|
6acf609 |
return [(rows, cols)]
|
|
|
6acf609 |
|
|
|
6acf609 |
def L_op(self, inputs, outputs, output_gradients):
|
|
|
6acf609 |
- """
|
|
|
6acf609 |
+ r"""
|
|
|
6acf609 |
Reverse-mode gradient updates for matrix solve operation c = A \\\ b.
|
|
|
6acf609 |
|
|
|
6acf609 |
Symbolic expression for updates taken from [#]_.
|
|
|
6acf609 |
--- theano/tensor/tests/mlp_test.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ theano/tensor/tests/mlp_test.py 2019-08-22 16:30:23.307092085 -0600
|
|
|
6acf609 |
@@ -93,7 +93,7 @@ class LogisticRegression(object):
|
|
|
6acf609 |
self.params = [self.W]
|
|
|
6acf609 |
|
|
|
6acf609 |
def negative_log_likelihood(self, y):
|
|
|
6acf609 |
- """Return the mean of the negative log-likelihood of the prediction
|
|
|
6acf609 |
+ r"""Return the mean of the negative log-likelihood of the prediction
|
|
|
6acf609 |
of this model under a given target distribution.
|
|
|
6acf609 |
|
|
|
6acf609 |
.. math::
|
|
|
6acf609 |
--- versioneer.py.orig 2019-01-15 14:13:57.000000000 -0700
|
|
|
6acf609 |
+++ versioneer.py 2019-08-22 16:19:43.175333211 -0600
|
|
|
6acf609 |
@@ -418,7 +418,7 @@ def run_command(commands, args, cwd=None
|
|
|
6acf609 |
return stdout, p.returncode
|
|
|
6acf609 |
|
|
|
6acf609 |
|
|
|
6acf609 |
-LONG_VERSION_PY['git'] = '''
|
|
|
6acf609 |
+LONG_VERSION_PY['git'] = r'''
|
|
|
6acf609 |
# This file helps to compute a version number in source trees obtained from
|
|
|
6acf609 |
# git-archive tarball (such as those provided by githubs download-from-tag
|
|
|
6acf609 |
# feature). Distribution tarballs (built by setup.py sdist) and build
|