Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f75434f3
提交
f75434f3
authored
7月 09, 2024
作者:
Virgile Andreani
提交者:
Virgile Andreani
7月 12, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix broken strings
上级
0fa80893
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
10 行增加
和
12 行删除
+10
-12
types.py
pytensor/compile/function/types.py
+1
-1
gradient.py
pytensor/gradient.py
+1
-1
check_blas.py
pytensor/misc/check_blas.py
+1
-1
elemwise_openmp_speedup.py
pytensor/misc/elemwise_openmp_speedup.py
+1
-1
elemwise_time_test.py
pytensor/misc/elemwise_time_test.py
+1
-1
pkl_utils.py
pytensor/misc/pkl_utils.py
+1
-1
elemwise.py
pytensor/tensor/elemwise.py
+1
-3
shape.py
pytensor/tensor/shape.py
+1
-1
test_basic.py
tests/sparse/test_basic.py
+1
-1
test_math.py
tests/tensor/test_math.py
+1
-1
没有找到文件。
pytensor/compile/function/types.py
浏览文件 @
f75434f3
...
@@ -1067,7 +1067,7 @@ class Function:
...
@@ -1067,7 +1067,7 @@ class Function:
container
=
property
(
container
=
property
(
lambda
self
:
self
.
_container
,
lambda
self
:
self
.
_container
,
None
,
# this property itself is not settable
None
,
# this property itself is not settable
doc
=
(
"dictionary-like access to the containers associated with
"
"
Variables"
),
doc
=
(
"dictionary-like access to the containers associated with Variables"
),
)
)
def
free
(
self
):
def
free
(
self
):
...
...
pytensor/gradient.py
浏览文件 @
f75434f3
...
@@ -1328,7 +1328,7 @@ def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):
...
@@ -1328,7 +1328,7 @@ def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):
elif
connected
and
not
actually_connected
:
elif
connected
and
not
actually_connected
:
msg
=
f
"{node.op}.grad returned DisconnectedType for input {i}."
msg
=
f
"{node.op}.grad returned DisconnectedType for input {i}."
if
hasattr
(
node
.
op
,
"connection_pattern"
):
if
hasattr
(
node
.
op
,
"connection_pattern"
):
msg
+=
" Its connection_pattern method does not
"
"
allow this."
msg
+=
" Its connection_pattern method does not allow this."
raise
TypeError
(
msg
)
raise
TypeError
(
msg
)
else
:
else
:
msg
+=
(
msg
+=
(
...
...
pytensor/misc/check_blas.py
浏览文件 @
f75434f3
...
@@ -111,7 +111,7 @@ parser.add_option(
...
@@ -111,7 +111,7 @@ parser.add_option(
action
=
"store_true"
,
action
=
"store_true"
,
dest
=
"quiet"
,
dest
=
"quiet"
,
default
=
False
,
default
=
False
,
help
=
"If true, do not print the comparison table and config
"
"
options"
,
help
=
"If true, do not print the comparison table and config options"
,
)
)
parser
.
add_option
(
parser
.
add_option
(
"--print_only"
,
"--print_only"
,
...
...
pytensor/misc/elemwise_openmp_speedup.py
浏览文件 @
f75434f3
...
@@ -11,7 +11,7 @@ from pytensor.configdefaults import config
...
@@ -11,7 +11,7 @@ from pytensor.configdefaults import config
console_encoding
=
getpreferredencoding
()
console_encoding
=
getpreferredencoding
()
parser
=
OptionParser
(
parser
=
OptionParser
(
usage
=
"
%
prog <options>
\n
Compute time for
"
"
fast and slow elemwise operations"
usage
=
"
%
prog <options>
\n
Compute time for fast and slow elemwise operations"
)
)
parser
.
add_option
(
parser
.
add_option
(
"-N"
,
"-N"
,
...
...
pytensor/misc/elemwise_time_test.py
浏览文件 @
f75434f3
...
@@ -11,7 +11,7 @@ from pytensor.tensor.type import vector
...
@@ -11,7 +11,7 @@ from pytensor.tensor.type import vector
parser
=
OptionParser
(
parser
=
OptionParser
(
usage
=
"
%
prog <options>
\n
Compute time for
"
"
fast and slow elemwise operations"
usage
=
"
%
prog <options>
\n
Compute time for fast and slow elemwise operations"
)
)
parser
.
add_option
(
parser
.
add_option
(
"-N"
,
"-N"
,
...
...
pytensor/misc/pkl_utils.py
浏览文件 @
f75434f3
...
@@ -12,7 +12,7 @@ import pytensor
...
@@ -12,7 +12,7 @@ import pytensor
__docformat__
=
"restructuredtext en"
__docformat__
=
"restructuredtext en"
__authors__
=
"Pascal Lamblin
"
"PyMC Developers "
"
PyTensor Developers "
__authors__
=
"Pascal Lamblin
PyMC Developers
PyTensor Developers "
__copyright__
=
"Copyright 2013, Universite de Montreal"
__copyright__
=
"Copyright 2013, Universite de Montreal"
__license__
=
"3-clause BSD"
__license__
=
"3-clause BSD"
...
...
pytensor/tensor/elemwise.py
浏览文件 @
f75434f3
...
@@ -1563,9 +1563,7 @@ class CAReduce(COp):
...
@@ -1563,9 +1563,7 @@ class CAReduce(COp):
elif
identity
is
None
:
elif
identity
is
None
:
raise
TypeError
(
f
"The {self.scalar_op} does not define an identity."
)
raise
TypeError
(
f
"The {self.scalar_op} does not define an identity."
)
task0_decl
=
(
task0_decl
=
f
"{adtype}& {aname}_i = *{aname}_iter;
\n
{aname}_i = {identity};"
f
"{adtype}& {aname}_i = *{aname}_iter;
\n
"
f
"{aname}_i = {identity};"
)
task1_decl
=
f
"{idtype}& {inames[0]}_i = *{inames[0]}_iter;
\n
"
task1_decl
=
f
"{idtype}& {inames[0]}_i = *{inames[0]}_iter;
\n
"
...
...
pytensor/tensor/shape.py
浏览文件 @
f75434f3
...
@@ -316,7 +316,7 @@ class Shape_i(COp):
...
@@ -316,7 +316,7 @@ class Shape_i(COp):
op
=
self
,
op
=
self
,
x_pos
=
0
,
x_pos
=
0
,
x
=
inp
[
0
],
x
=
inp
[
0
],
comment
=
(
"No gradient for the shape of a matrix "
"is implemented."
)
,
comment
=
"No gradient for the shape of a matrix is implemented."
,
)
)
]
]
...
...
tests/sparse/test_basic.py
浏览文件 @
f75434f3
...
@@ -328,7 +328,7 @@ def verify_grad_sparse(op, pt, structured=False, *args, **kwargs):
...
@@ -328,7 +328,7 @@ def verify_grad_sparse(op, pt, structured=False, *args, **kwargs):
iconv
.
append
(
conv_none
)
iconv
.
append
(
conv_none
)
output
=
op
(
*
[
as_sparse_or_tensor_variable
(
p
)
for
p
in
pt
])
output
=
op
(
*
[
as_sparse_or_tensor_variable
(
p
)
for
p
in
pt
])
if
isinstance
(
output
,
list
|
tuple
):
if
isinstance
(
output
,
list
|
tuple
):
raise
NotImplementedError
(
"verify_grad can't deal with
"
"
multiple outputs"
)
raise
NotImplementedError
(
"verify_grad can't deal with multiple outputs"
)
if
_is_sparse_variable
(
output
):
if
_is_sparse_variable
(
output
):
oconv
=
DenseFromSparse
(
structured
=
structured
)
oconv
=
DenseFromSparse
(
structured
=
structured
)
else
:
else
:
...
...
tests/tensor/test_math.py
浏览文件 @
f75434f3
...
@@ -2535,7 +2535,7 @@ class TestArithmeticCast:
...
@@ -2535,7 +2535,7 @@ class TestArithmeticCast:
# a float32 may result in a complex64. As
# a float32 may result in a complex64. As
# of 1.9.2. this is still the case so it is
# of 1.9.2. this is still the case so it is
# probably by design
# probably by design
pytest
.
skip
(
"Known issue with
"
"
numpy see #761"
)
pytest
.
skip
(
"Known issue with
numpy see #761"
)
# In any other situation: something wrong is
# In any other situation: something wrong is
# going on!
# going on!
raise
AssertionError
()
raise
AssertionError
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论