replace self.model() with self.forward

pull/1116/head
weishengyu 2021-08-08 02:05:26 +08:00
parent 6c164c9e2b
commit 91af66dccd
1 changed files with 2 additions and 2 deletions

View File

@ -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)