提交 36abf1c2 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

props to theano/sandbox/fourier.py

上级 c356183f
......@@ -11,6 +11,9 @@ from theano.gof import Op, Apply, generic
class GradTodo(Op):
__props__ = ()
def make_node(self, x):
return Apply(self, [x], [x.type()])
......@@ -40,22 +43,12 @@ class FFT(Op):
half = False
"""Only return the first half (positive-valued) of the frequency components"""
__props__ = ("half", "inverse")
def __init__(self, half=False, inverse=False):
self.half = half
self.inverse = inverse
def __eq__(self, other):
return (type(self) == type(other) and
self.half == other.half and
self.inverse == other.inverse)
def __hash__(self):
return hash(type(self)) ^ hash(self.half) ^ 9828743 ^ (self.inverse)
def __ne__(self, other):
return not(self == other)
def make_node(self, frames, n, axis):
""" compute an n-point fft of frames along given axis """
_frames = tensor.as_tensor(frames, ndim=2)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论