Commit d899c925 authored by Yuxin Wu's avatar Yuxin Wu

fix DummyConstantInput

parent 8059ee40
...@@ -361,8 +361,8 @@ class DummyConstantInput(TensorInput): ...@@ -361,8 +361,8 @@ class DummyConstantInput(TensorInput):
tlist = [] tlist = []
ctx = get_current_tower_context() ctx = get_current_tower_context()
assert ctx is not None assert ctx is not None
assert len(self.shapes) == len(self.inputs_desc) assert len(self.shapes) == len(self._desc)
for idx, p in enumerate(self.inputs_desc): for idx, p in enumerate(self._desc):
tlist.append(tf.constant( tlist.append(tf.constant(
0, dtype=p.type, 0, dtype=p.type,
name='dummy-{}-{}'.format(p.name, ctx.index), name='dummy-{}-{}'.format(p.name, ctx.index),
...@@ -370,9 +370,6 @@ class DummyConstantInput(TensorInput): ...@@ -370,9 +370,6 @@ class DummyConstantInput(TensorInput):
return tlist return tlist
super(DummyConstantInput, self).__init__(fn) super(DummyConstantInput, self).__init__(fn)
def _setup(self, inputs):
self.inputs_desc = inputs
class ZMQInput(TensorInput): class ZMQInput(TensorInput):
""" """
......
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