提交 c4698740 authored 作者: Frederic Bastien's avatar Frederic Bastien

A new fix to how we hid useless warning to the user.

上级 ff952f71
...@@ -4,11 +4,9 @@ Implementations of BLAS Ops based on scipy's BLAS bindings. ...@@ -4,11 +4,9 @@ Implementations of BLAS Ops based on scipy's BLAS bindings.
import numpy import numpy
from blas import Ger, ger, ger_destructive from blas import Ger, ger, ger_destructive
from blas import Gemv from blas import blas_optdb, optdb,local_optimizer
from blas import Gemm
from blas import blas_optdb, optdb,local_optimizer, EquilibriumOptimizer
import theano from theano.tensor.opt import in2out
try: try:
import scipy.linalg.blas import scipy.linalg.blas
...@@ -68,17 +66,11 @@ def use_scipy_ger(node): ...@@ -68,17 +66,11 @@ def use_scipy_ger(node):
@local_optimizer([ScipyGer(False)]) @local_optimizer([ScipyGer(False)])
def make_ger_destructive(node): def make_ger_destructive(node):
if (node.op == ScipyGer(False) and if node.op == ScipyGer(False):
not isinstance(node.inputs[0], theano.gof.Constant)):
return [ScipyGer(True)(*node.inputs)] return [ScipyGer(True)(*node.inputs)]
use_scipy_blas = EquilibriumOptimizer( use_scipy_blas = in2out(use_scipy_ger)
[use_scipy_ger], make_scipy_blas_destructive = in2out(make_ger_destructive)
max_use_ratio=5)
make_scipy_blas_destructive = EquilibriumOptimizer(
[make_ger_destructive],
max_use_ratio=5)
if have_fblas: if have_fblas:
# scipy_blas is scheduled in the blas_optdb very late, because scipy sortof # scipy_blas is scheduled in the blas_optdb very late, because scipy sortof
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论