Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
a6994e93
提交
a6994e93
authored
7月 29, 2016
作者:
sentient07
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reverted few changes again and fixed a wrong import
上级
c9300c5d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
2 行增加
和
7 行删除
+2
-7
basic.py
theano/tensor/basic.py
+0
-4
opt.py
theano/tensor/opt.py
+1
-1
test_opt.py
theano/tensor/tests/test_opt.py
+1
-2
没有找到文件。
theano/tensor/basic.py
浏览文件 @
a6994e93
...
...
@@ -2354,8 +2354,6 @@ def zeros(shape, dtype=None):
shape
=
[
shape
]
if
dtype
is
None
:
dtype
=
config
.
floatX
if
isinstance
(
shape
,
(
list
,
tuple
))
and
len
(
shape
)
==
0
:
return
constant
(
0.0
,
dtype
=
dtype
)
return
alloc
(
numpy
.
array
(
0
,
dtype
=
dtype
),
*
shape
)
...
...
@@ -2367,8 +2365,6 @@ def ones(shape, dtype=None):
shape
=
[
shape
]
if
dtype
is
None
:
dtype
=
config
.
floatX
if
isinstance
(
shape
,
(
list
,
tuple
))
and
len
(
shape
)
==
0
:
return
constant
(
1.0
,
dtype
=
dtype
)
return
alloc
(
numpy
.
array
(
1
,
dtype
=
dtype
),
*
shape
)
...
...
theano/tensor/opt.py
浏览文件 @
a6994e93
...
...
@@ -2036,7 +2036,7 @@ def local_useless_elemwise(node):
return
[
node
.
inputs
[
0
]]
elif
(
node
.
op
.
scalar_op
==
theano
.
scalar
.
identity
and
len
(
node
.
inputs
)
==
1
):
return
return
[
node
.
inputs
[
0
]]
elif
(
isinstance
(
node
.
op
.
scalar_op
,
scalar
.
AND
)
and
len
(
node
.
inputs
)
==
2
):
...
...
theano/tensor/tests/test_opt.py
浏览文件 @
a6994e93
...
...
@@ -39,7 +39,6 @@ from theano.tensor.opt import (
local_useless_reshape
,
local_reshape_to_dimshuffle
,
mul_canonizer
,
out2in
,
Shape_i
,
Assert
,
MakeVector
,
...
...
@@ -70,7 +69,7 @@ from theano.tensor.elemwise import DimShuffle
from
theano.tests
import
unittest_tools
as
utt
from
theano.compile.mode
import
optdb
from
theano.compile
import
Mode
from
theano.gof.opt
import
check_stack_trace
from
theano.gof.opt
import
check_stack_trace
,
out2in
from
nose.plugins.attrib
import
attr
mode_opt
=
theano
.
config
.
mode
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论