Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4a0f0342
提交
4a0f0342
authored
8月 11, 2011
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't catch interupt and remove import not used.
上级
f9813f0f
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
6 行增加
和
8 行删除
+6
-8
printing.py
theano/printing.py
+1
-1
nvcc_compiler.py
theano/sandbox/cuda/nvcc_compiler.py
+1
-1
walltime.py
theano/sandbox/cuda/tests/walltime.py
+1
-3
ops.py
theano/sandbox/linalg/ops.py
+1
-1
symbolic_module.py
theano/sandbox/symbolic_module.py
+1
-1
scan_op.py
theano/scan_module/scan_op.py
+1
-1
没有找到文件。
theano/printing.py
浏览文件 @
4a0f0342
...
@@ -702,7 +702,7 @@ def pydotprint_variables(vars,
...
@@ -702,7 +702,7 @@ def pydotprint_variables(vars,
config
.
device
+
'.'
+
format
)
config
.
device
+
'.'
+
format
)
try
:
try
:
import
pydot
as
pd
import
pydot
as
pd
except
:
except
ImportError
:
print
"failed to import pydot. Yous must install pydot for this function to work."
print
"failed to import pydot. Yous must install pydot for this function to work."
return
return
g
=
pd
.
Dot
()
g
=
pd
.
Dot
()
...
...
theano/sandbox/cuda/nvcc_compiler.py
浏览文件 @
4a0f0342
...
@@ -264,7 +264,7 @@ def nvcc_module_compile_str(
...
@@ -264,7 +264,7 @@ def nvcc_module_compile_str(
continue
continue
if
l
[
l
.
index
(
':'
):]
.
startswith
(
': warning: label'
):
if
l
[
l
.
index
(
':'
):]
.
startswith
(
': warning: label'
):
continue
continue
except
:
except
Exception
:
pass
pass
print
>>
sys
.
stderr
,
l
print
>>
sys
.
stderr
,
l
print
>>
sys
.
stderr
,
'==============================='
print
>>
sys
.
stderr
,
'==============================='
...
...
theano/sandbox/cuda/tests/walltime.py
浏览文件 @
4a0f0342
import
sys
,
time
import
sys
,
time
from
theano.compile.sharedvalue
import
shared
from
theano.compile.pfunc
import
pfunc
from
theano.compile.pfunc
import
pfunc
from
theano
import
tensor
from
theano
import
tensor
import
numpy
import
numpy
import
theano.sandbox.cuda
as
tcn
import
theano.sandbox.cuda
as
tcn
from
theano.sandbox.cuda.basic_ops
import
host_from_gpu
,
gpu_from_host
def
compare_fns
(
fns
,
input
,
reps
=
10
):
def
compare_fns
(
fns
,
input
,
reps
=
10
):
times
=
{}
times
=
{}
...
@@ -15,7 +13,7 @@ def compare_fns(fns, input, reps=10):
...
@@ -15,7 +13,7 @@ def compare_fns(fns, input, reps=10):
print
'TOPOSORT'
,
implname
print
'TOPOSORT'
,
implname
for
i
,
n
in
enumerate
(
impl
.
maker
.
env
.
toposort
()):
for
i
,
n
in
enumerate
(
impl
.
maker
.
env
.
toposort
()):
print
i
,
n
print
i
,
n
except
:
except
Exception
:
pass
pass
t0
=
time
.
time
()
t0
=
time
.
time
()
for
i
in
xrange
(
reps
):
for
i
in
xrange
(
reps
):
...
...
theano/sandbox/linalg/ops.py
浏览文件 @
4a0f0342
...
@@ -12,7 +12,7 @@ from theano.gof.opt import Optimizer
...
@@ -12,7 +12,7 @@ from theano.gof.opt import Optimizer
try
:
try
:
import
scipy.linalg
import
scipy.linalg
except
:
except
ImportError
:
pass
# some ops (e.g. Cholesky) won't work
pass
# some ops (e.g. Cholesky) won't work
class
Hint
(
Op
):
class
Hint
(
Op
):
...
...
theano/sandbox/symbolic_module.py
浏览文件 @
4a0f0342
...
@@ -61,7 +61,7 @@ class SymbolicModule(object):
...
@@ -61,7 +61,7 @@ class SymbolicModule(object):
def
issymbolicmodule
(
thing
):
def
issymbolicmodule
(
thing
):
try
:
try
:
return
issubclass
(
thing
,
SymbolicModule
)
return
issubclass
(
thing
,
SymbolicModule
)
except
:
except
Exception
:
return
False
return
False
def
issymbolicmethod
(
thing
):
def
issymbolicmethod
(
thing
):
...
...
theano/scan_module/scan_op.py
浏览文件 @
4a0f0342
...
@@ -1104,7 +1104,7 @@ class Scan(PureOp):
...
@@ -1104,7 +1104,7 @@ class Scan(PureOp):
# states) it is more of a safety check ( all random
# states) it is more of a safety check ( all random
# states should be after n_outs_not_shared ...
# states should be after n_outs_not_shared ...
g_outs
[
i
]
=
tensor
.
zeros_like
(
scan_outputs
[
i
])
g_outs
[
i
]
=
tensor
.
zeros_like
(
scan_outputs
[
i
])
except
:
except
Exception
:
g_outs
[
i
]
=
theano
.
tensor
.
constant
(
g_outs
[
i
]
=
theano
.
tensor
.
constant
(
numpy
.
array
(
0
,
theano
.
config
.
floatX
))
numpy
.
array
(
0
,
theano
.
config
.
floatX
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论