提交 a9ae9555 编写于 作者: L LielinJiang

fix PYTHONPATH

上级 4a493273
...@@ -255,7 +255,7 @@ class MobileNetV1(Model): ...@@ -255,7 +255,7 @@ class MobileNetV1(Model):
if self.with_pool: if self.with_pool:
y = self.pool2d_avg(y) y = self.pool2d_avg(y)
if self.num_classes > -1: if self.num_classes > 0:
y = fluid.layers.reshape(y, shape=[-1, 1024]) y = fluid.layers.reshape(y, shape=[-1, 1024])
y = self.out(y) y = self.out(y)
return y return y
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# when test, you should add hapi root path to the PYTHONPATH,
# export PYTHONPATH=PATH_TO_HAPI:$PYTHONPATH
import unittest import unittest
import time import time
import random import random
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# when test, you should add hapi root path to the PYTHONPATH,
# export PYTHONPATH=PATH_TO_HAPI:$PYTHONPATH
import unittest import unittest
import sys
sys.path.append('..')
from datasets.folder import DatasetFolder from datasets.folder import DatasetFolder
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
# when test, you should add hapi root path to the PYTHONPATH,
# export PYTHONPATH=PATH_TO_HAPI:$PYTHONPATH
import unittest import unittest
import os import os
import sys
sys.path.append('../')
import numpy as np import numpy as np
import contextlib import contextlib
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# when test, you should add hapi root path to the PYTHONPATH,
# export PYTHONPATH=PATH_TO_HAPI:$PYTHONPATH
import unittest import unittest
import random import random
import time import time
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# when test, you should add hapi root path to the PYTHONPATH,
# export PYTHONPATH=PATH_TO_HAPI:$PYTHONPATH
import unittest import unittest
import sys
sys.path.append('..')
from datasets.folder import DatasetFolder from datasets.folder import DatasetFolder
from transform import transforms from transform import transforms
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册