Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4d6ec42a
提交
4d6ec42a
authored
11月 22, 2016
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Also add the message in C.
上级
d53d21a6
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
10 行删除
+18
-10
scan_perform.c
theano/scan_module/scan_perform.c
+0
-0
scan_perform.pyx
theano/scan_module/scan_perform.pyx
+9
-1
scan_perform_ext.py
theano/scan_module/scan_perform_ext.py
+9
-9
没有找到文件。
theano/scan_module/scan_perform.c
浏览文件 @
4d6ec42a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
theano/scan_module/scan_perform.pyx
浏览文件 @
4d6ec42a
...
@@ -62,7 +62,7 @@ import copy
...
@@ -62,7 +62,7 @@ import copy
def get_version():
def get_version():
return 0.29
3
return 0.29
4
@cython.boundscheck(False)
@cython.boundscheck(False)
def perform(
def perform(
...
@@ -544,7 +544,15 @@ def perform(
...
@@ -544,7 +544,15 @@ def perform(
output_reused = False
output_reused = False
if not output_reused:
if not output_reused:
try:
outs[j][0][pos[j]] = output_storage[j+offset_out].storage[0]
outs[j][0][pos[j]] = output_storage[j+offset_out].storage[0]
except ValueError as e:
raise ValueError(
"An output of the scan has changed shape. "
"This may be caused by a pushout optimization."
" Try adding "
"'optimizer_excluding=scanOp_pushout_output' "
"to your Theano flags.")
# 5.6 Copy over the values for outputs corresponding to shared
# 5.6 Copy over the values for outputs corresponding to shared
# variables
# variables
...
...
theano/scan_module/scan_perform_ext.py
浏览文件 @
4d6ec42a
...
@@ -17,7 +17,7 @@ from theano.gof import cmodule
...
@@ -17,7 +17,7 @@ from theano.gof import cmodule
_logger
=
logging
.
getLogger
(
'theano.scan_module.scan_perform'
)
_logger
=
logging
.
getLogger
(
'theano.scan_module.scan_perform'
)
version
=
0.29
3
# must match constant returned in function get_version()
version
=
0.29
4
# must match constant returned in function get_version()
need_reload
=
False
need_reload
=
False
...
@@ -94,7 +94,7 @@ except ImportError:
...
@@ -94,7 +94,7 @@ except ImportError:
# the old interface.
# the old interface.
if
False
:
if
False
:
# During scan cython development, it is helpful to keep the old interface, to don't manually edit the c file each time.
# During scan cython development, it is helpful to keep the old interface, to don't manually edit the c file each time.
preargs
.
remove
(
'-D
NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'
)
preargs
.
remove
(
'-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'
)
else
:
else
:
numpy_ver
=
[
int
(
n
)
for
n
in
numpy
.
__version__
.
split
(
'.'
)[:
2
]]
numpy_ver
=
[
int
(
n
)
for
n
in
numpy
.
__version__
.
split
(
'.'
)[:
2
]]
# Add add some macro to lower the number of edit
# Add add some macro to lower the number of edit
...
@@ -102,13 +102,13 @@ except ImportError:
...
@@ -102,13 +102,13 @@ except ImportError:
if
bool
(
numpy_ver
>=
[
1
,
7
]):
if
bool
(
numpy_ver
>=
[
1
,
7
]):
# Needed when we disable the old API, as cython
# Needed when we disable the old API, as cython
# use the old interface
# use the old interface
preargs
.
append
(
"-D
NPY_ENSUREARRAY=NPY_ARRAY_ENSUREARRAY"
)
preargs
.
append
(
"-DNPY_ENSUREARRAY=NPY_ARRAY_ENSUREARRAY"
)
preargs
.
append
(
"-D
NPY_ENSURECOPY=NPY_ARRAY_ENSURECOPY"
)
preargs
.
append
(
"-DNPY_ENSURECOPY=NPY_ARRAY_ENSURECOPY"
)
preargs
.
append
(
"-D
NPY_ALIGNED=NPY_ARRAY_ALIGNED"
)
preargs
.
append
(
"-DNPY_ALIGNED=NPY_ARRAY_ALIGNED"
)
preargs
.
append
(
"-D
NPY_WRITEABLE=NPY_ARRAY_WRITEABLE"
)
preargs
.
append
(
"-DNPY_WRITEABLE=NPY_ARRAY_WRITEABLE"
)
preargs
.
append
(
"-D
NPY_UPDATE_ALL=NPY_ARRAY_UPDATE_ALL"
)
preargs
.
append
(
"-DNPY_UPDATE_ALL=NPY_ARRAY_UPDATE_ALL"
)
preargs
.
append
(
"-D
NPY_C_CONTIGUOUS=NPY_ARRAY_C_CONTIGUOUS"
)
preargs
.
append
(
"-DNPY_C_CONTIGUOUS=NPY_ARRAY_C_CONTIGUOUS"
)
preargs
.
append
(
"-D
NPY_F_CONTIGUOUS=NPY_ARRAY_F_CONTIGUOUS"
)
preargs
.
append
(
"-DNPY_F_CONTIGUOUS=NPY_ARRAY_F_CONTIGUOUS"
)
cmodule
.
GCC_compiler
.
compile_str
(
dirname
,
code
,
location
=
loc
,
cmodule
.
GCC_compiler
.
compile_str
(
dirname
,
code
,
location
=
loc
,
preargs
=
preargs
,
preargs
=
preargs
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论