Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
bb8c54ae
提交
bb8c54ae
authored
11月 09, 2012
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Typo fixes
上级
ece7b6fd
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
14 行增加
和
15 行删除
+14
-15
theano.txt
doc/cifarSC2011/theano.txt
+1
-1
logreg_example.py
doc/hpcs2011_tutorial/logreg_example.py
+1
-1
extending_theano.txt
doc/tutorial/extending_theano.txt
+2
-2
modes.txt
doc/tutorial/modes.txt
+2
-2
modes_solution_1.py
doc/tutorial/modes_solution_1.py
+1
-1
printing_drawing.txt
doc/tutorial/printing_drawing.txt
+1
-1
using_gpu.txt
doc/tutorial/using_gpu.txt
+3
-4
using_gpu_solution_1.py
doc/tutorial/using_gpu_solution_1.py
+1
-1
scan.py
theano/sandbox/scan_module/scan.py
+1
-1
scan.py
theano/scan_module/scan.py
+1
-1
没有找到文件。
doc/cifarSC2011/theano.txt
浏览文件 @
bb8c54ae
...
...
@@ -208,7 +208,7 @@ Exercise 2
# Construct Theano expression graph
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabily of having a one
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabil
it
y of having a one
prediction = p_1 > 0.5 # The prediction that is done: 0 or 1
xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy
cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize
...
...
doc/hpcs2011_tutorial/logreg_example.py
浏览文件 @
bb8c54ae
...
...
@@ -20,7 +20,7 @@ y.tag.test_value = D[1]
# Construct Theano expression graph
p_1
=
1
/
(
1
+
T
.
exp
(
-
T
.
dot
(
x
,
w
)
-
b
))
# Probabily of having a one
p_1
=
1
/
(
1
+
T
.
exp
(
-
T
.
dot
(
x
,
w
)
-
b
))
# Probabil
it
y of having a one
prediction
=
p_1
>
0.5
# The prediction that is done: 0 or 1
xent
=
-
y
*
T
.
log
(
p_1
)
-
(
1
-
y
)
*
T
.
log
(
1
-
p_1
)
# Cross-entropy
cost
=
xent
.
mean
()
+
0.01
*
(
w
**
2
)
.
sum
()
# The cost to optimize
...
...
doc/tutorial/extending_theano.txt
浏览文件 @
bb8c54ae
...
...
@@ -9,7 +9,7 @@ Theano Graphs
=============
- Theano works with symbolic graphs.
- Those graphs are bi-partite graphs (graph with 2 types of nodes).
- Those graphs are bi-partite graphs (graph
s
with 2 types of nodes).
- The two types of nodes are ``Apply`` and ``Variable`` nodes.
- Each ``Apply`` node has a link to the op that it executes.
...
...
@@ -359,7 +359,7 @@ file containing a specific test of interest and run the file. In this example, t
t.setUp()
t.test_double_rop()
We recomm
a
nd that when we execute a file, we run all tests in that
We recomm
e
nd that when we execute a file, we run all tests in that
file. This can be done by adding this at the end of your test files:
.. code-block:: python
...
...
doc/tutorial/modes.txt
浏览文件 @
bb8c54ae
...
...
@@ -67,7 +67,7 @@ Consider the logistic regression:
#print w.get_value(), b.get_value()
# Construct Theano expression graph
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabily of having a one
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabil
it
y of having a one
prediction = p_1 > 0.5 # The prediction that is done: 0 or 1
xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy
cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize
...
...
@@ -110,7 +110,7 @@ as it will be useful later on.
.. Note::
* Apply the Theano flag ``floatX=float32``
through (
``theano.config.floatX``) in your code.
* Apply the Theano flag ``floatX=float32``
(through
``theano.config.floatX``) in your code.
* Cast inputs before storing them into a shared variable.
* Circumvent the automatic cast of *int32* with *float32* to *float64*:
...
...
doc/tutorial/modes_solution_1.py
浏览文件 @
bb8c54ae
...
...
@@ -27,7 +27,7 @@ y.tag.test_value = D[1]
#print w.get_value(), b.get_value()
# Construct Theano expression graph
p_1
=
1
/
(
1
+
tt
.
exp
(
-
tt
.
dot
(
x
,
w
)
-
b
))
# Probabily of having a one
p_1
=
1
/
(
1
+
tt
.
exp
(
-
tt
.
dot
(
x
,
w
)
-
b
))
# Probabil
it
y of having a one
prediction
=
p_1
>
0.5
# The prediction that is done: 0 or 1
xent
=
-
y
*
tt
.
log
(
p_1
)
-
(
1
-
y
)
*
tt
.
log
(
1
-
p_1
)
# Cross-entropy
cost
=
tt
.
cast
(
xent
.
mean
(),
'float32'
)
+
\
...
...
doc/tutorial/printing_drawing.txt
浏览文件 @
bb8c54ae
...
...
@@ -42,7 +42,7 @@ The following output depicts the pre- and post- compilation graphs.
# Construct Theano expression graph
p_1 = 1 / (1 + T.exp(-T.dot(x, w) - b)) # Probabily of having a one
p_1 = 1 / (1 + T.exp(-T.dot(x, w) - b)) # Probabil
it
y of having a one
prediction = p_1 > 0.5 # The prediction that is done: 0 or 1
xent = -y * T.log(p_1) - (1 - y) * T.log(1 - p_1) # Cross-entropy
cost = xent.mean() + 0.01 * (w ** 2).sum() # The cost to optimize
...
...
doc/tutorial/using_gpu.txt
浏览文件 @
bb8c54ae
...
...
@@ -342,7 +342,7 @@ Consider again the logistic regression:
#print w.get_value(), b.get_value()
# Construct Theano expression graph
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabily of having a one
p_1 = 1 / (1 + T.exp(-T.dot(x, w)-b)) # Probabil
it
y of having a one
prediction = p_1 > 0.5 # The prediction that is done: 0 or 1
xent = -y*T.log(p_1) - (1-y)*T.log(1-p_1) # Cross-entropy
cost = xent.mean() + 0.01*(w**2).sum() # The cost to optimize
...
...
@@ -400,7 +400,7 @@ What can be done to further increase the speed of the GPU version? Put your idea
* Use the Theano flag ``device=gpu`` to require use of the GPU device.
* Use ``device=gpu{0, 1, ...}`` to specify which GPU if you have more than one.
* Apply the Theano flag ``floatX=float32``
through (
``theano.config.floatX``) in your code.
* Apply the Theano flag ``floatX=float32``
(through
``theano.config.floatX``) in your code.
* ``Cast`` inputs before storing them into a ``shared`` variable.
* Circumvent the automatic cast of *int32* with *float32* to *float64*:
...
...
@@ -623,5 +623,4 @@ only applicable to computations involving a single output. Hence, to gain
efficiency over the basic solution that is asked here, the two operations would
have to be jointly optimized explicitly in the code.)
Modify and execute to support *stride* (i.e. so as not constrain the input to be *C-contiguous*).
Modify and execute to support *stride* (i.e. to avoid constraining the input to be *C-contiguous*).
doc/tutorial/using_gpu_solution_1.py
浏览文件 @
bb8c54ae
...
...
@@ -38,7 +38,7 @@ y.tag.test_value = D[1]
#print w.get_value(), b.get_value()
# Construct Theano expression graph
p_1
=
1
/
(
1
+
tt
.
exp
(
-
tt
.
dot
(
x
,
w
)
-
b
))
# Probabily of having a one
p_1
=
1
/
(
1
+
tt
.
exp
(
-
tt
.
dot
(
x
,
w
)
-
b
))
# Probabil
it
y of having a one
prediction
=
p_1
>
0.5
# The prediction that is done: 0 or 1
xent
=
-
y
*
tt
.
log
(
p_1
)
-
(
1
-
y
)
*
tt
.
log
(
1
-
p_1
)
# Cross-entropy
cost
=
tt
.
cast
(
xent
.
mean
(),
'float32'
)
+
\
...
...
theano/sandbox/scan_module/scan.py
浏览文件 @
bb8c54ae
...
...
@@ -132,7 +132,7 @@ def scan(fn,
The list of ``non_sequences`` can also contain shared variables
used in the function, though ``scan`` is able to figure those
out on its own so they can be skipped. For the clarity of the
code we recomm
a
nd though to provide them to scan. To some extend
code we recomm
e
nd though to provide them to scan. To some extend
``scan`` can also figure out other ``non sequences`` (not shared)
even if not passed to scan (but used by `fn`). A simple example of
this would be :
...
...
theano/scan_module/scan.py
浏览文件 @
bb8c54ae
...
...
@@ -130,7 +130,7 @@ def scan(fn,
The list of ``non_sequences`` can also contain shared variables
used in the function, though ``scan`` is able to figure those
out on its own so they can be skipped. For the clarity of the
code we recomm
a
nd though to provide them to scan. To some extend
code we recomm
e
nd though to provide them to scan. To some extend
``scan`` can also figure out other ``non sequences`` (not shared)
even if not passed to scan (but used by `fn`). A simple example of
this would be :
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论