Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
fix bug caused by batching in inception_mixture
  • Loading branch information
Larryjianfeng committed Aug 6, 2019
1 parent 4edb8ee commit fd37e6d94ec0deee71582dddd0d91ee49028ef25
Showing with 5 additions and 4 deletions.
  1. +5 −4 gnes/encoder/video/
@@ -113,20 +113,21 @@ def encode(self, data: List['np.ndarray'], *args, **kwargs) -> np.ndarray:
in img]

def _encode1(_, data):
def _encode1(self, data):
_, end_points_ =, self.end_points),
feed_dict={self.inputs: data})
return end_points_[self.select_layer]

v = [_ for vi in _encode1(None, img) for _ in vi]
v = [_ for vi in _encode1(self, img) for _ in vi]

v_input = [v[s:e] for s, e in zip(pos_start, pos_end)]
v_input = [(vi + [[0.0] * self.input_size] * (max_len - len(vi)))[:max_len] for vi in v_input]
v_input = [np.array(vi, dtype=np.float32) for vi in v_input]

def _encode2(_, data):
def _encode2(self, data):
feed_dict={self.mix_model.feeds: data})

return _encode2(None, v_input).astype(np.float32)
return _encode2(self, v_input).astype(np.float32)

0 comments on commit fd37e6d

Please sign in to comment.