提交 ed8c69c9 authored 作者: David Warde-Farley's avatar David Warde-Farley

Make the code runnable/copy-pasteable.

Added 'pass' method bodies.
上级 a70b8c33
...@@ -28,25 +28,42 @@ Op contract ...@@ -28,25 +28,42 @@ Op contract
class MyOp(theano.Op): class MyOp(theano.Op):
def make_node(self, *inputs): def make_node(self, *inputs):
pass
def __eq__(self, other): def __eq__(self, other):
pass
def __hash__(self): def __hash__(self):
pass
def __str__(self): def __str__(self):
pass
# Python implementation: # Python implementation:
def perform(self, node, inputs_storage, output_storage): def perform(self, node, inputs_storage, output_storage):
pass
# C implementation: [see theano web site for other functions] # C implementation: [see theano web site for other functions]
def c_code(...): def c_code(...):
# ... # ...
pass
# others implementation (pycuda, ...): # others implementation (pycuda, ...):
def make_thunk(self, node, storage_map, _, _2): def make_thunk(self, node, storage_map, _, _2):
pass
# optional: # optional:
def __init__(self, ...): def __init__(self, ...):
pass
def grad(self, inputs, g): def grad(self, inputs, g):
pass
def R_op(self, inputs, eval_points): def R_op(self, inputs, eval_points):
pass
def infer_shape(node, (i0_shapes, ...)) def infer_shape(node, (i0_shapes, ...))
pass
.. ../extending/op.txt .. ../extending/op.txt
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论