Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
06e92b2a
提交
06e92b2a
authored
1月 31, 2015
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bypass some add stack trace
上级
3073069a
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
8 行删除
+14
-8
elemwise.py
theano/sandbox/cuda/elemwise.py
+14
-8
没有找到文件。
theano/sandbox/cuda/elemwise.py
浏览文件 @
06e92b2a
...
@@ -132,9 +132,9 @@ class NaiveAlgo(object):
...
@@ -132,9 +132,9 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code??
#TODO: What if the scalar_op needs support_code??
task_code
=
self
.
scalar_op
.
c_code
(
task_code
=
self
.
scalar_op
.
c_code
(
Apply
(
self
.
scalar_op
,
Apply
(
self
.
scalar_op
,
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)()
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)
.
make_variable
()
for
input
in
node
.
inputs
],
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)()
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)
.
make_variable
()
for
output
in
node
.
outputs
]),
for
output
in
node
.
outputs
]),
nodename
+
'_scalar_'
,
nodename
+
'_scalar_'
,
get_str_list_logical_scalar
(
node
),
get_str_list_logical_scalar
(
node
),
...
@@ -253,8 +253,10 @@ class NaiveAlgo(object):
...
@@ -253,8 +253,10 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code??
#TODO: What if the scalar_op needs support_code??
task_code
=
self
.
scalar_op
.
c_code
(
task_code
=
self
.
scalar_op
.
c_code
(
Apply
(
self
.
scalar_op
,
Apply
(
self
.
scalar_op
,
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)()
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)
.
make_variable
()
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)()
for
output
in
node
.
outputs
])
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)
.
make_variable
()
for
output
in
node
.
outputs
])
,
nodename
+
'_scalar_'
,
nodename
+
'_scalar_'
,
get_str_list_logical_scalar
(
node
,
value_str
=
'value0[
%
i]'
)
,
get_str_list_logical_scalar
(
node
,
value_str
=
'value0[
%
i]'
)
,
[
'ii_o
%
i_data[0]'
%
ipos
for
ipos
,
i
in
enumerate
(
node
.
outputs
)]
,
[
'ii_o
%
i_data[0]'
%
ipos
for
ipos
,
i
in
enumerate
(
node
.
outputs
)]
...
@@ -389,8 +391,10 @@ class NaiveAlgo(object):
...
@@ -389,8 +391,10 @@ class NaiveAlgo(object):
def
task_code
(
d
):
def
task_code
(
d
):
print
>>
sio
,
self
.
scalar_op
.
c_code
(
print
>>
sio
,
self
.
scalar_op
.
c_code
(
Apply
(
self
.
scalar_op
,
Apply
(
self
.
scalar_op
,
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)()
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)
.
make_variable
()
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)()
for
output
in
node
.
outputs
])
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)
.
make_variable
()
for
output
in
node
.
outputs
])
,
nodename
+
'_scalar_'
,
nodename
+
'_scalar_'
,
[
'i
%
i_data_
%
i[0]'
%
(
ipos
,
d
)
for
ipos
,
i
in
enumerate
(
node
.
inputs
)]
,
[
'i
%
i_data_
%
i[0]'
%
(
ipos
,
d
)
for
ipos
,
i
in
enumerate
(
node
.
inputs
)]
,
[
'o
%
i_data_
%
i[0]'
%
(
ipos
,
d
)
for
ipos
,
i
in
enumerate
(
node
.
outputs
)]
,
[
'o
%
i_data_
%
i[0]'
%
(
ipos
,
d
)
for
ipos
,
i
in
enumerate
(
node
.
outputs
)]
...
@@ -461,8 +465,10 @@ class NaiveAlgo(object):
...
@@ -461,8 +465,10 @@ class NaiveAlgo(object):
#TODO: What if the scalar_op needs support_code??
#TODO: What if the scalar_op needs support_code??
task_code
=
self
.
scalar_op
.
c_code
(
task_code
=
self
.
scalar_op
.
c_code
(
Apply
(
self
.
scalar_op
,
Apply
(
self
.
scalar_op
,
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)()
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
input
.
type
.
dtype
)
.
make_variable
()
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)()
for
output
in
node
.
outputs
])
for
input
in
node
.
inputs
],
[
scalar
.
Scalar
(
dtype
=
output
.
type
.
dtype
)
.
make_variable
()
for
output
in
node
.
outputs
])
,
nodename
+
'_scalar_'
,
nodename
+
'_scalar_'
#, ['i%i_data[i]'%ipos for ipos, i in enumerate(node.inputs)]
#, ['i%i_data[i]'%ipos for ipos, i in enumerate(node.inputs)]
,
get_str_list_logical_scalar
(
node
,
data_str
=
'i
%
i_data[i]'
)
,
get_str_list_logical_scalar
(
node
,
data_str
=
'i
%
i_data[i]'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论