Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
90f9614b
提交
90f9614b
authored
6月 23, 2015
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove use of generators in default flags.
上级
332d2fd7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1 行增加
和
37 行删除
+1
-37
configparser.py
theano/configparser.py
+1
-6
blas.py
theano/tensor/blas.py
+0
-31
没有找到文件。
theano/configparser.py
浏览文件 @
90f9614b
...
@@ -3,7 +3,6 @@ from __future__ import print_function
...
@@ -3,7 +3,6 @@ from __future__ import print_function
# as False, and the string s'True', 'true', '1' as True.
# as False, and the string s'True', 'true', '1' as True.
# We also accept the bool type as its corresponding value!
# We also accept the bool type as its corresponding value!
import
inspect
import
logging
import
logging
import
os
import
os
import
shlex
import
shlex
...
@@ -306,11 +305,7 @@ class ConfigParam(object):
...
@@ -306,11 +305,7 @@ class ConfigParam(object):
try
:
try
:
val_str
=
fetch_val_for_key
(
self
.
fullname
)
val_str
=
fetch_val_for_key
(
self
.
fullname
)
except
KeyError
:
except
KeyError
:
if
inspect
.
isgeneratorfunction
(
self
.
default
):
if
callable
(
self
.
default
):
for
v
in
self
.
default
():
val_str
=
v
self
.
__set__
(
None
,
val_str
)
elif
callable
(
self
.
default
):
val_str
=
self
.
default
()
val_str
=
self
.
default
()
else
:
else
:
val_str
=
self
.
default
val_str
=
self
.
default
...
...
theano/tensor/blas.py
浏览文件 @
90f9614b
...
@@ -162,37 +162,6 @@ _logger = logging.getLogger('theano.tensor.blas')
...
@@ -162,37 +162,6 @@ _logger = logging.getLogger('theano.tensor.blas')
# We need to define blas.ldflag before we try to import scipy.
# We need to define blas.ldflag before we try to import scipy.
# Otherwise, we give an optimization warning for no reason in some cases.
# Otherwise, we give an optimization warning for no reason in some cases.
def
default_blas_ldflags
():
def
default_blas_ldflags
():
"""This is a generator. It work in 2 step. The first we guess a
default blas, then we test it. If it fail, we return an empty
blas.
This is needed for Anaconda on Windows. I wasn't able to find how
to detect if the mkl from Anaconda can be reused or not. I was not
able to find a way to test it with try_flags correctly. Also, this
will test the real code, so we do not need to update the test in
case the software change. This also enables the test for all
cases.
"""
flags
=
static_default_blas_flags
()
yield
flags
# Now test it!
try
:
old
=
config
.
compute_test_value
config
.
compute_test_value
=
'off'
x
=
theano
.
tensor
.
fmatrix
()
try
:
theano
.
function
([
x
],
theano
.
tensor
.
blas
.
_dot22
(
x
,
x
),
profile
=
False
)
except
Exception
as
e
:
print
(
e
)
yield
""
finally
:
config
.
compute_test_value
=
old
def
static_default_blas_flags
():
try
:
try
:
if
(
hasattr
(
numpy
.
distutils
,
'__config__'
)
and
if
(
hasattr
(
numpy
.
distutils
,
'__config__'
)
and
numpy
.
distutils
.
__config__
):
numpy
.
distutils
.
__config__
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论