def compile_function(inputs=None, outputs=None, updates=None, givens=None, log_name=None, **kwargs):
import theano
if log_name:
msg = Message("Compiling function %s" % log_name)
msg.__enter__()
ret = theano.function(
inputs=inputs,
outputs=outputs,
updates=updates,
givens=givens,
on_unused_input='ignore',
allow_input_downcast=True,
**kwargs
)
if log_name:
msg.__exit__(None, None, None)
return ret
评论列表
文章目录