提交 91af66dc 编写于 作者: W weishengyu

replace self.model() with self.forward

上级 6c164c9e
......@@ -597,7 +597,7 @@ class Trainer(object):
if len(batch) == 3:
has_unique_id = True
batch[2] = batch[2].reshape([-1, 1]).astype("int64")
out = self.model(batch[0], batch[1])
out = self.forward(batch)
batch_feas = out["features"]
# do norm
......@@ -662,7 +662,7 @@ class Trainer(object):
image_file_list.append(image_file)
if len(batch_data) >= batch_size or idx == len(image_list) - 1:
batch_tensor = paddle.to_tensor(batch_data)
out = self.model(batch_tensor)
out = self.forward(batch_tensor)
if isinstance(out, list):
out = out[0]
result = postprocess_func(out, image_file_list)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册