• Pascal Lamblin's avatar
    Re-add part of the dtype constraint on out grads · 3bd9ffde
    Pascal Lamblin 提交于
    In order to avoid expanding memory usage and computations in the part of
    the graph that computes gradients, I propose the following conventions,
    that re-instate some of the constraint that existed before on the
    dtype of gradients:
    - When calling some_op.grad(inputs, output_grads), each variable in the
      "output_grads" list, if it is an actual numeric variable (and not,
      for instance, DisconnectedType or NullType), should have the same
      dtype as the corresponding output variable.
    - Moreover, if one of the output variables is of a discrete dtype (int
      or uint), then the corresponding output gradient (if not a special
      case like NullType) should be zeros.
    
    This is implemented in theano.grad, so the Op's grad method does not
    have to be changed, but now it can rely again on the fact that, if an
    output gradient has a dtype, that dtype will be the same as the
    corresponding output variable.
    3bd9ffde
名称
最后提交
最后更新
benchmark 正在载入提交数据...
bin 正在载入提交数据...
doc 正在载入提交数据...
theano 正在载入提交数据...
.gitignore 正在载入提交数据...
.mailmap 正在载入提交数据...
.travis.yml 正在载入提交数据...
DESCRIPTION.txt 正在载入提交数据...
EMAIL.txt 正在载入提交数据...
HISTORY.txt 正在载入提交数据...
LICENSE.txt 正在载入提交数据...
MANIFEST.in 正在载入提交数据...
NEWS.txt 正在载入提交数据...
README.txt 正在载入提交数据...
Theano.pyproj 正在载入提交数据...
Theano.sln 正在载入提交数据...
setup.cfg 正在载入提交数据...
setup.py 正在载入提交数据...