Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
42db0775
提交
42db0775
authored
5月 18, 2022
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
6月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert more arguments to Numpy arrays in scan_perform.pyx
上级
bb999046
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
8 行删除
+12
-8
scan_perform.c
aesara/scan/c_code/scan_perform.c
+0
-0
op.py
aesara/scan/op.py
+8
-4
scan_perform.pyx
aesara/scan/scan_perform.pyx
+3
-3
scan_perform_ext.py
aesara/scan/scan_perform_ext.py
+1
-1
没有找到文件。
aesara/scan/c_code/scan_perform.c
浏览文件 @
42db0775
This source diff could not be displayed because it is too large. You can
view the blob
instead.
aesara/scan/op.py
浏览文件 @
42db0775
...
@@ -1546,13 +1546,16 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
...
@@ -1546,13 +1546,16 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
cython_pos
=
np
.
zeros
(
n_outs
+
self
.
info
.
n_nit_sot
,
dtype
=
np
.
int32
)
cython_pos
=
np
.
zeros
(
n_outs
+
self
.
info
.
n_nit_sot
,
dtype
=
np
.
int32
)
cython_store_steps
=
np
.
zeros
(
n_outs
+
self
.
info
.
n_nit_sot
,
dtype
=
np
.
int32
)
cython_store_steps
=
np
.
zeros
(
n_outs
+
self
.
info
.
n_nit_sot
,
dtype
=
np
.
int32
)
tap_array_len
=
tuple
(
tap_array_len
=
np
.
array
(
[
len
(
x
)
len
(
x
)
for
x
in
chain
(
for
x
in
chain
(
self
.
info
.
mit_mot_in_slices
,
self
.
info
.
mit_mot_in_slices
,
self
.
info
.
mit_sot_in_slices
,
self
.
info
.
mit_sot_in_slices
,
self
.
info
.
sit_sot_in_slices
,
self
.
info
.
sit_sot_in_slices
,
)
)
],
dtype
=
np
.
uint32
,
)
)
cython_vector_seqs
=
np
.
asarray
(
self
.
vector_seqs
,
dtype
=
bool
)
cython_vector_seqs
=
np
.
asarray
(
self
.
vector_seqs
,
dtype
=
bool
)
...
@@ -1575,10 +1578,11 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
...
@@ -1575,10 +1578,11 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
inner_output_storage
=
[
s
.
storage
for
s
in
self
.
fn
.
output_storage
]
inner_output_storage
=
[
s
.
storage
for
s
in
self
.
fn
.
output_storage
]
outer_output_dtypes
=
tuple
(
outer_output_dtypes
=
tuple
(
getattr
(
out
,
"dtype"
,
None
)
for
out
in
node
.
outputs
getattr
(
out
,
"dtype"
,
object
)
for
out
in
node
.
outputs
)
)
outer_output_ndims
=
tuple
(
getattr
(
out
,
"ndim"
,
None
)
for
out
in
node
.
outputs
outer_output_ndims
=
np
.
array
(
[
getattr
(
out
,
"ndim"
,
0
)
for
out
in
node
.
outputs
],
dtype
=
np
.
uint32
)
)
from
aesara.scan.utils
import
InnerFunctionError
from
aesara.scan.utils
import
InnerFunctionError
...
...
aesara/scan/scan_perform.pyx
浏览文件 @
42db0775
...
@@ -62,7 +62,7 @@ numpy.import_array()
...
@@ -62,7 +62,7 @@ numpy.import_array()
def get_version():
def get_version():
return 0.32
0
return 0.32
1
# TODO: We need to get rid of the negative indexing performed with `pos` and `l`.
# TODO: We need to get rid of the negative indexing performed with `pos` and `l`.
# @cython.wraparound(False)
# @cython.wraparound(False)
...
@@ -80,7 +80,7 @@ def perform(
...
@@ -80,7 +80,7 @@ def perform(
int[:] pos not None,
int[:] pos not None,
int[:] store_steps not None,
int[:] store_steps not None,
tuple tap_array not None,
tuple tap_array not None,
tuple
tap_array_len not None,
const unsigned int[:]
tap_array_len not None,
const numpy.npy_bool[:] vector_seqs not None,
const numpy.npy_bool[:] vector_seqs not None,
const numpy.npy_bool[:] vector_outs not None,
const numpy.npy_bool[:] vector_outs not None,
tuple mit_mot_out_slices not None,
tuple mit_mot_out_slices not None,
...
@@ -92,7 +92,7 @@ def perform(
...
@@ -92,7 +92,7 @@ def perform(
list outer_inputs not None,
list outer_inputs not None,
list outer_outputs not None,
list outer_outputs not None,
tuple outer_output_dtypes not None,
tuple outer_output_dtypes not None,
tuple
outer_output_ndims not None,
const unsigned int[:]
outer_output_ndims not None,
fn,
fn,
) -> (time_t, int):
) -> (time_t, int):
"""
"""
...
...
aesara/scan/scan_perform_ext.py
浏览文件 @
42db0775
...
@@ -23,7 +23,7 @@ if not config.cxx:
...
@@ -23,7 +23,7 @@ if not config.cxx:
_logger
=
logging
.
getLogger
(
"aesara.scan.scan_perform"
)
_logger
=
logging
.
getLogger
(
"aesara.scan.scan_perform"
)
version
=
0.32
0
# must match constant returned in function get_version()
version
=
0.32
1
# must match constant returned in function get_version()
need_reload
=
False
need_reload
=
False
scan_perform
:
Optional
[
ModuleType
]
=
None
scan_perform
:
Optional
[
ModuleType
]
=
None
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论