Commit 8b879cb9 authored by Yuxin Wu's avatar Yuxin Wu

bugfix in InputDesc initialization

parent a266459e
......@@ -24,7 +24,7 @@ class InputDesc(
_cached_placeholder = None
def __init__(self, type, shape, name):
def __new__(cls, type, shape, name):
"""
Args:
type (tf.DType):
......@@ -32,7 +32,8 @@ class InputDesc(
name (str):
"""
shape = tuple(shape) # has to be tuple for self to be hashable
super(InputDesc, self).__init__(type, shape, name)
self = super(InputDesc, cls).__new__(cls, type, shape, name)
return self
# TODO in serialization, skip _cached_placeholder
# def dumps(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment