提交 d2bdf120 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #5241 from nouiz/mixed

Small mixed stuff
......@@ -24,6 +24,9 @@ Scan
The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
`A good ipython notebook with explanation and more examples.
<https://github.com/lamblin/ccw_tutorial/blob/master/Scan_W2016/scan_tutorial.ipynb>`_
**Scan Example: Computing tanh(x(t).dot(W) + b) elementwise**
.. testcode::
......
......@@ -916,7 +916,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
fail and we try again 'py', prepare_node will be called twice.
"""
if impl is None or impl == 'c':
if (impl is None and theano.config.cxx) or impl == 'c':
self.prepare_node(node, storage_map=storage_map,
compute_map=compute_map, impl='c')
try:
......
......@@ -168,7 +168,7 @@ class Query(object):
"""
def __init__(self, include, require=None, exclude=None,
subquery=None, position_cutoff=None,
subquery=None, position_cutoff=float('inf'),
extra_optimizations=None):
self.include = OrderedSet(include)
self.require = require or OrderedSet()
......@@ -185,7 +185,7 @@ class Query(object):
def __str__(self):
return ("Query{inc=%s,ex=%s,require=%s,subquery=%s,"
"position_cutoff=%d,extra_opts=%s}" %
"position_cutoff=%f,extra_opts=%s}" %
(self.include, self.exclude, self.require, self.subquery,
self.position_cutoff, self.extra_optimizations))
......
......@@ -725,6 +725,8 @@ class VM_Linker(link.LocalLinker):
self.callback = callback
self.callback_input = callback_input
self.lazy = lazy
if c_thunks is None:
c_thunks = bool(theano.config.cxx)
self.c_thunks = c_thunks
self.allow_partial_eval = allow_partial_eval
self.updated_vars = {}
......
......@@ -74,7 +74,6 @@ void * device_malloc(size_t size)
return device_malloc(size, VERBOSE_DEVICE_MALLOC);
}
///@TODO: thejaswi: link this option to a theano config variable?
static bool g_use_cnmem = false;
static const int g_max_devices = 8;
int initCnmem(int card_number_provided, int card_nb, size_t mem) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论