提交 e6e32c2f authored 作者: Iulian Vlad Serban's avatar Iulian Vlad Serban

Minor modifications.

上级 ef76cee9
......@@ -122,16 +122,13 @@ class RecordMode(Mode):
record = Record(file_object=output, replay=False)
record_mode = RecordMode(record)
# Then call the function you wish to test, which uses Apply nodes,
# with record_mode as first parameter to record all the computations
# to file. For example, call a theano function which takes the record
# mode as mode:
# Compile a new Theano function with the RecordMode object.
x = theano.tensor.dscalar()
f = theano.function([x], 2*x, mode=record_mode)
print f(4)
# Create a new RecordMode object and initialize it with the previous
# Create another RecordMode object and initialize it with the previous
# record.
output = cStringIO.StringIO(output.getvalue())
playback = Record(file_object=output, replay=True)
......@@ -187,10 +184,10 @@ class RecordMode(Mode):
Line to record. For example, the function name or node name.
i : integer
Node number in the toposort order.
node : ApplyNode,
The ApplyNode which created the entry.
fn : FunctionType,
Function related to ApplyNode.
node : Apply,
The Apply node which created the entry.
fn : Function,
Function related to Apply node.
"""
try:
self.record.handle_line(line)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论