Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
99ed65a0
提交
99ed65a0
authored
6月 17, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flake8 for solve.py
上级
131ea96a
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
10 行增加
和
6 行删除
+10
-6
solve.py
theano/sandbox/solve.py
+10
-5
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/sandbox/solve.py
浏览文件 @
99ed65a0
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
,
scipy
.
linalg
from
theano
import
gof
,
tensor
,
scalar
import
unittest
import
unittest
import
sys
import
numpy
import
scipy.linalg
import
theano
from
theano
import
gof
,
tensor
,
scalar
from
theano.tests
import
unittest_tools
as
utt
class
Solve
(
gof
.
Op
):
class
Solve
(
gof
.
Op
):
...
@@ -32,7 +39,7 @@ class Solve(gof.Op):
...
@@ -32,7 +39,7 @@ class Solve(gof.Op):
raise
TypeError
(
"b must be a matrix or vector"
,
b_
.
type
)
raise
TypeError
(
"b must be a matrix or vector"
,
b_
.
type
)
odtype
=
scalar
.
upcast
(
A_
.
dtype
,
b_
.
dtype
)
odtype
=
scalar
.
upcast
(
A_
.
dtype
,
b_
.
dtype
)
otype
=
tensor
.
TensorType
(
broadcastable
=
b_
.
broadcastable
,
dtype
=
odtype
)
otype
=
tensor
.
TensorType
(
broadcastable
=
b_
.
broadcastable
,
dtype
=
odtype
)
return
gof
.
Apply
(
op
=
self
,
inputs
=
[
A
,
B
],
outputs
=
[
otype
()])
return
gof
.
Apply
(
op
=
self
,
inputs
=
[
A
_
,
b_
],
outputs
=
[
otype
()])
def
perform
(
self
,
node
,
inp
,
out
):
def
perform
(
self
,
node
,
inp
,
out
):
A
,
b
=
inp
A
,
b
=
inp
...
@@ -49,8 +56,6 @@ solve = Solve()
...
@@ -49,8 +56,6 @@ solve = Solve()
# TODO: test dtype conversion
# TODO: test dtype conversion
# TODO: test that invalid types are rejected by make_node
# TODO: test that invalid types are rejected by make_node
# TODO: test that each valid type for A and b works correctly
# TODO: test that each valid type for A and b works correctly
from
theano.tests
import
unittest_tools
as
utt
class
T_solve
(
unittest
.
TestCase
):
class
T_solve
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
...
theano/tests/test_flake8.py
浏览文件 @
99ed65a0
...
@@ -135,7 +135,6 @@ whitelist_flake8 = [
...
@@ -135,7 +135,6 @@ whitelist_flake8 = [
"sandbox/test_theano_object.py"
,
"sandbox/test_theano_object.py"
,
"sandbox/test_scan.py"
,
"sandbox/test_scan.py"
,
"sandbox/rng_mrg.py"
,
"sandbox/rng_mrg.py"
,
"sandbox/solve.py"
,
"sandbox/theano_object.py"
,
"sandbox/theano_object.py"
,
"sandbox/scan.py"
,
"sandbox/scan.py"
,
"sandbox/multinomial.py"
,
"sandbox/multinomial.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论