未验证 提交 9f8853ab 编写于 作者: S Steffy-zxf 提交者: GitHub

Merge pull request #720 from Steffy-zxf/fix-humanseg

Fix humanseg
......@@ -105,9 +105,9 @@ class EfficientNetB0ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -105,9 +105,9 @@ class EfficientNetB0SmallImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -108,9 +108,9 @@ class EfficientNetB1ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -105,9 +105,9 @@ class EfficientNetB2ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -105,9 +105,9 @@ class EfficientNetB3ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -105,9 +105,9 @@ class EfficientNetB4ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
......@@ -76,9 +76,9 @@ class EfficientNetB5ImageNet(hub.Module):
try:
_places = os.environ["CUDA_VISIBLE_DEVICES"]
int(_places[0])
use_gpu = True
except:
use_gpu = False
except:
use_gpu = True
if use_gpu:
gpu_config = AnalysisConfig(self.default_pretrained_model_path)
gpu_config.disable_glog_info()
......
......@@ -105,9 +105,9 @@ class EfficientNetB7ImageNet(hub.Module):
context_prog (fluid.Program): program for transfer learning.
"""
if phase in ["dev", "test", "predict", "eval"]:
is_test = False
elif phase in ["train"]:
is_test = True
elif phase in ["train"]:
is_test = False
else:
raise ValueError(
"Phase %s is error, which must be one of train, dev, test, eval and predict."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册