提交 e8995c93 authored 作者: Sina Honari's avatar Sina Honari

updating the comments

上级 72f174f9
......@@ -227,25 +227,16 @@ class Scan(PureOp):
'compared to its corresponding slice in the initial '
'state (outputs_info in scan nomenclature). For example, '
'if the inner function of scan returns a vector '
'(dimensionality 1) of size d and scan uses the values of '
'of size d and scan uses the values of '
'the previous time-step, then the initial state in scan '
'should be a matrix (dimensionality 2) of shape (1, d). '
'should be a matrix of shape (1, d). '
'The first dimension of this '
'matrix corresponds to the number of previous time-steps'
'that scan uses in each of its iterations. If for '
'example scan uses up to 3 previous time-step values, '
'the initial matrix should have a shape of (3, d). '
'matrix corresponds to the number of previous time-steps '
'that scan uses in each of its iterations. '
'In order to solve this issue if the two slices currently '
'have the same dimensionality, you can increase the '
'dimensionality of the slice in the initial state of scan '
'by using dimshuffle or shape_padleft. '
'As an exmaple, if you only '
'use the values of the previous time-step and the '
'corresponding variable in the inner function of scan '
'returns a vector, then use v.dimshuffle(\'x\', 0) or '
'theano.tensor.shape_padleft(v, n_ones=1) for vector v in '
'the initial state of scan to change it from a vector to '
'a matrix. '
)
err_msg2 = ('When compiling the inner function of scan the '
'following error has been encountered: The '
......@@ -263,25 +254,16 @@ class Scan(PureOp):
'function of scan (`fn`) has %d dimension(s) (it should '
'be one less than the initial state). For example, '
'if the inner function of scan returns a vector '
'(dimensionality 1) of size d and scan uses the values of '
'of size d and scan uses the values of '
'the previous time-step, then the initial state in scan '
'should be a matrix (dimensionality 2) of shape (1, d). '
'should be a matrix of shape (1, d). '
'The first dimension of this '
'matrix corresponds to the number of previous time-steps'
'that scan uses in each of its iterations. If for '
'example scan uses up to 3 previous time-step values, '
'the initial matrix should have a shape of (3, d). '
'matrix corresponds to the number of previous time-steps '
'that scan uses in each of its iterations. '
'In order to solve this issue if the two slices currently '
'have the same dimensionality, you can increase the '
'dimensionality of the slice in the initial state of scan '
'by using dimshuffle or shape_padleft. '
'As an exmaple, if you only '
'use the values of the previous time-step and the '
'corresponding variable in the inner function of scan '
'returns a vector, then use v.dimshuffle(\'x\', 0) or '
'theano.tensor.shape_padleft(v, n_ones=1) for vector v in '
'the initial state of scan to change it from a vector to '
'a matrix. '
)
def format(var, as_var):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论