提交 1a45cf8d authored 作者: Iban Harlouchet's avatar Iban Harlouchet

__props__ for theano/tensor/opt.py

上级 1d07f91b
...@@ -588,14 +588,11 @@ class MakeVector(T.Op): ...@@ -588,14 +588,11 @@ class MakeVector(T.Op):
into the graph. Should work with 0 inputs. The constant_folding into the graph. Should work with 0 inputs. The constant_folding
optimization will remove it. optimization will remove it.
""" """
def __init__(self, dtype='int64'):
self.dtype = dtype
def __eq__(self, other): __props__ = ("dtype",)
return type(self) == type(other) and self.dtype == other.dtype
def __hash__(self): def __init__(self, dtype='int64'):
return hash(type(self)) ^ hash(self.dtype) self.dtype = dtype
def make_node(self, *inputs): def make_node(self, *inputs):
inputs = list(map(T.as_tensor_variable, inputs)) inputs = list(map(T.as_tensor_variable, inputs))
...@@ -625,9 +622,6 @@ class MakeVector(T.Op): ...@@ -625,9 +622,6 @@ class MakeVector(T.Op):
otype = T.TensorType(broadcastable=(bcastable,), dtype=dtype) otype = T.TensorType(broadcastable=(bcastable,), dtype=dtype)
return T.Apply(self, inputs, [otype()]) return T.Apply(self, inputs, [otype()])
def __str__(self):
return self.__class__.__name__
def perform(self, node, inputs, out_): def perform(self, node, inputs, out_):
out, = out_ out, = out_
# not calling theano._asarray as optimization # not calling theano._asarray as optimization
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论