Commit 80561b15 authored by LDOUBLEV's avatar LDOUBLEV
Browse files

x as dict

parent 202a0b5b
...@@ -79,7 +79,10 @@ class BaseModel(nn.Layer): ...@@ -79,7 +79,10 @@ class BaseModel(nn.Layer):
x = self.neck(x) x = self.neck(x)
y["neck_out"] = x y["neck_out"] = x
x = self.head(x, targets=data) x = self.head(x, targets=data)
y["head_out"] = x if type(x) is dict:
y.update(x)
else:
y["head_out"] = x
if self.return_all_feats: if self.return_all_feats:
return y return y
else: else:
......
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