Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
b7b95ee2
提交
b7b95ee2
authored
3月 30, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
small fix following code review.
上级
be9826d9
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
NEWS.txt
NEWS.txt
+2
-2
debugmode.py
theano/compile/debugmode.py
+1
-1
basic_ops.py
theano/sandbox/cuda/basic_ops.py
+4
-3
cuda_ndarray.cu
theano/sandbox/cuda/cuda_ndarray.cu
+4
-2
没有找到文件。
NEWS.txt
浏览文件 @
b7b95ee2
...
@@ -53,8 +53,8 @@ New Features
...
@@ -53,8 +53,8 @@ New Features
(Frederic B., Simon McGregor)
(Frederic B., Simon McGregor)
* MRG random now raises an error with a clear message when the passed shape
* MRG random now raises an error with a clear message when the passed shape
contains dimensions with bad value like 0. (Frédéric B. reported by Ian G.)
contains dimensions with bad value like 0. (Frédéric B. reported by Ian G.)
* "CudaNdarra[*] = ndarray" work in more case (Frederic B.)
* "CudaNdarra
y
[*] = ndarray" work in more case (Frederic B.)
* "CudaNdarra[*] += ndarray" work in more case (Frederic B.)
* "CudaNdarra
y
[*] += ndarray" work in more case (Frederic B.)
* We add dimensions to CudaNdarray to automatically broadcast more frequently.
* We add dimensions to CudaNdarray to automatically broadcast more frequently.
(Frederic B.)
(Frederic B.)
...
...
theano/compile/debugmode.py
浏览文件 @
b7b95ee2
...
@@ -1028,7 +1028,7 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val,
...
@@ -1028,7 +1028,7 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val,
# Build a C-contiguous buffer
# Build a C-contiguous buffer
new_buf
=
r
.
type
.
value_zeros
(
r_vals
[
r
]
.
shape
)
new_buf
=
r
.
type
.
value_zeros
(
r_vals
[
r
]
.
shape
)
# CudaNdarray don't have flags field
# CudaNdarray don't have flags field
#
assert new_buf.flags["C_CONTIGUOUS"]
#
assert new_buf.flags["C_CONTIGUOUS"]
new_buf
+=
numpy
.
asarray
(
def_val
)
.
astype
(
r
.
type
.
dtype
)
new_buf
+=
numpy
.
asarray
(
def_val
)
.
astype
(
r
.
type
.
dtype
)
c_cont_outputs
[
r
]
=
new_buf
c_cont_outputs
[
r
]
=
new_buf
...
...
theano/sandbox/cuda/basic_ops.py
浏览文件 @
b7b95ee2
...
@@ -1937,9 +1937,10 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
...
@@ -1937,9 +1937,10 @@ class GpuAdvancedIncSubtensor1(tensor.AdvancedIncSubtensor1, GpuOp):
return
Apply
(
self
,
[
x_
,
y_
,
ilist_
],
[
x_
.
type
()])
return
Apply
(
self
,
[
x_
,
y_
,
ilist_
],
[
x_
.
type
()])
#def perform(self, node, inp, out_):
# CudaNdarray_Subscript() don't support Advanced slicing.
# CudaNdarray_Subscript() don't support Advanced slicing.
# But we can't use the parent version that loop on each indices
# so we use the parent version that loop on each indices.
# as we also need to loop when set_instead_of_inc is True and the
# parent don't look in that case.
def
perform
(
self
,
node
,
inp
,
out_
):
def
perform
(
self
,
node
,
inp
,
out_
):
# TODO opt to make this inplace
# TODO opt to make this inplace
x
,
y
,
idx
=
inp
x
,
y
,
idx
=
inp
...
...
theano/sandbox/cuda/cuda_ndarray.cu
浏览文件 @
b7b95ee2
...
@@ -1065,7 +1065,9 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
...
@@ -1065,7 +1065,9 @@ CudaNdarray_inplace_elemwise(PyObject* py_self, PyObject * py_other, operator_t
{
{
PyErr_SetString
(
PyErr_SetString
(
PyExc_ValueError
,
PyExc_ValueError
,
"CudaNdarray_inplace_elemwise cannot work inplace on un-initialized array when the new value have more then 0 or 1 broadcastable dimensions"
);
"CudaNdarray_inplace_elemwise cannot work inplace on"
" un-initialized array when the new value have more then"
" 0 or 1 broadcastable dimensions"
);
Py_XDECREF
(
new_other
);
Py_XDECREF
(
new_other
);
return
0
;
return
0
;
}
}
...
@@ -2802,7 +2804,7 @@ int CudaNdarray_CopyFromCudaNdarray(CudaNdarray * self,
...
@@ -2802,7 +2804,7 @@ int CudaNdarray_CopyFromCudaNdarray(CudaNdarray * self,
}
}
else
if
(
self
->
nd
!=
other
->
nd
)
else
if
(
self
->
nd
!=
other
->
nd
)
{
{
CudaNdarray
*
new_other
=
(
CudaNdarray
*
)
CudaNdarray_View
(
other
);
new_other
=
(
CudaNdarray
*
)
CudaNdarray_View
(
other
);
int
added_dims
=
self
->
nd
-
other
->
nd
;
int
added_dims
=
self
->
nd
-
other
->
nd
;
int
pattern
[
self
->
nd
];
int
pattern
[
self
->
nd
];
for
(
int
i
=
0
;
i
<
added_dims
;
i
++
)
for
(
int
i
=
0
;
i
<
added_dims
;
i
++
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论