fix xception flow to enable model export (#400)

pull/402/head
littletomatodonkey 2020-11-17 10:41:35 +08:00 committed by GitHub
parent 10e73342ff
commit 834cc16434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -238,13 +238,14 @@ class Xception_Block(nn.Layer):
x = self._conv1(inputs)
x = self._conv2(x)
x = self._conv3(x)
if self.has_skip is False:
return x
if self.skip_conv:
skip = self._short(inputs)
if self.has_skip:
if self.skip_conv:
skip = self._short(inputs)
else:
skip = inputs
return paddle.add(x, skip)
else:
skip = inputs
return paddle.add(x, skip)
return x
class XceptionDeeplab(nn.Layer):