瀏覽代碼

Update farseg.py

Fixed the bug of ‘import paddlers’
kongdebug 3 年之前
父節點
當前提交
faf4d1962f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      paddlers/custom_models/seg/models/farseg/farseg.py

+ 2 - 2
paddlers/custom_models/seg/models/farseg/farseg.py

@@ -17,7 +17,7 @@ import paddle.nn as nn
 import paddle.nn.functional as F
 import paddle.nn.functional as F
 from paddle.vision.models import resnet50
 from paddle.vision.models import resnet50
 from .fpn import FPN
 from .fpn import FPN
-from seg.models.utils import Identity
+from ..utils import Identity
 
 
 
 
 class SceneRelation(nn.Layer):
 class SceneRelation(nn.Layer):
@@ -168,4 +168,4 @@ class FarSeg(nn.Layer):
         cls_pred = self.cls_pred_conv(final_feat)
         cls_pred = self.cls_pred_conv(final_feat)
         cls_pred = self.upsample4x_op(cls_pred)
         cls_pred = self.upsample4x_op(cls_pred)
         cls_pred = F.softmax(cls_pred, axis=1)
         cls_pred = F.softmax(cls_pred, axis=1)
-        return [cls_pred]
+        return [cls_pred]