Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3ffd39ae
提交
3ffd39ae
authored
10月 02, 2016
作者:
Nan Rosemary Ke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move tips to profiling.py
上级
c4e4acca
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
32 行删除
+32
-32
profilemode.py
theano/compile/profilemode.py
+15
-15
profiling.py
theano/compile/profiling.py
+17
-17
没有找到文件。
theano/compile/profilemode.py
浏览文件 @
3ffd39ae
...
@@ -694,21 +694,21 @@ Test them first, as they are not guaranteed to always provide a speedup.""")
...
@@ -694,21 +694,21 @@ Test them first, as they are not guaranteed to always provide a speedup.""")
break
break
# tip 6
# tip 6
import
theano.sandbox.cuda
as
cuda
#
import theano.sandbox.cuda as cuda
from
theano.tensor.nnet
import
LogSoftmax
#
from theano.tensor.nnet import LogSoftmax
import
theano.tensor.signal.pool
as
pool
#
import theano.tensor.signal.pool as pool
import
theano.gpuarray
#
import theano.gpuarray
for
a
,
t
in
iteritems
(
apply_time
):
#
for a, t in iteritems(apply_time):
node
=
a
[
1
]
#
node = a[1]
if
(
isinstance
(
node
.
op
,
pool
.
Pool
)):
#
if (isinstance(node.op, pool.Pool)):
if
(
not
cuda
.
dnn
.
dnn_available
()
and
not
theano
.
gpuarray
.
dnn
.
dnn_present
()):
#
if (not cuda.dnn.dnn_available() and not theano.gpuarray.dnn.dnn_present()):
print
(
"Install CuDNN to do pooling faster"
#
print("Install CuDNN to do pooling faster"
"this allows the operation to run on GPU"
)
#
"this allows the operation to run on GPU")
if
(
isinstance
(
node
.
op
,
LogSoftmax
)):
#
if (isinstance(node.op, LogSoftmax)):
if
(
not
cuda
.
dnn
.
dnn_available
()
and
not
theano
.
gpuarray
.
dnn
.
dnn_present
()):
#
if (not cuda.dnn.dnn_available() and not theano.gpuarray.dnn.dnn_present()):
print
(
"Install CuDNN to do LogSoftmax faster"
#
print("Install CuDNN to do LogSoftmax faster"
"this allows the operation to run on GPU"
)
#
"this allows the operation to run on GPU")
if
not
printed_tip
:
if
not
printed_tip
:
print
(
" Sorry, no tip for today."
)
print
(
" Sorry, no tip for today."
)
...
...
theano/compile/profiling.py
浏览文件 @
3ffd39ae
...
@@ -1380,23 +1380,23 @@ class ProfileStats(object):
...
@@ -1380,23 +1380,23 @@ class ProfileStats(object):
printed_tip
=
True
printed_tip
=
True
# tip 7
# tip 7
#
import theano.sandbox.cuda as cuda
import
theano.sandbox.cuda
as
cuda
#
from theano.tensor.nnet import LogSoftmax
from
theano.tensor.nnet
import
LogSoftmax
#
import theano.tensor.signal.pool as pool
import
theano.tensor.signal.pool
as
pool
#
import theano.gpuarray
import
theano.gpuarray
#
for a, t in iteritems(apply_time):
for
a
,
t
in
iteritems
(
apply_time
):
#
node = a[1]
node
=
a
[
1
]
#
if (isinstance(node.op, pool.Pool)):
if
(
isinstance
(
node
.
op
,
pool
.
Pool
)):
#
if (not cuda.dnn.dnn_available() and not theano.gpuarray.dnn.dnn_present()):
if
(
not
cuda
.
dnn
.
dnn_available
()
and
not
theano
.
gpuarray
.
dnn
.
dnn_present
()):
#
print("Install CuDNN to do pooling faster"
print
(
"Install CuDNN to do pooling faster"
#
"this allows the operation to run on GPU")
"this allows the operation to run on GPU"
)
#
printed_tip = True
printed_tip
=
True
#
if (isinstance(node.op, LogSoftmax)):
if
(
isinstance
(
node
.
op
,
LogSoftmax
)):
#
if (not cuda.dnn.dnn_available() and not theano.gpuarray.dnn.dnn_present()):
if
(
not
cuda
.
dnn
.
dnn_available
()
and
not
theano
.
gpuarray
.
dnn
.
dnn_present
()):
#
print("Install CuDNN to do LogSoftmax faster"
print
(
"Install CuDNN to do LogSoftmax faster"
#
"this allows the operation to run on GPU")
"this allows the operation to run on GPU"
)
#
printed_tip = True
printed_tip
=
True
if
not
printed_tip
:
if
not
printed_tip
:
print
(
" Sorry, no tip for today."
,
file
=
file
)
print
(
" Sorry, no tip for today."
,
file
=
file
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论