|
|
@@ -18,7 +18,7 @@ import paddle.fluid as fluid
|
|
|
import paddlex as pdx
|
|
|
import numpy as np
|
|
|
from paddle.fluid.param_attr import ParamAttr
|
|
|
-from ..as_data_reader.readers import preprocess_image
|
|
|
+from paddlex.interpret.as_data_reader.readers import preprocess_image
|
|
|
|
|
|
def gen_user_home():
|
|
|
if "HOME" in os.environ:
|
|
|
@@ -125,4 +125,4 @@ def compute_features_for_kmeans(data_content):
|
|
|
images = preprocess_image(data_content) # transpose to [N, 3, H, W], scaled to [0.0, 1.0]
|
|
|
result = exe.run(prog, fetch_list=[resized_features], feed={'image': images})
|
|
|
|
|
|
- return result[0][0]
|
|
|
+ return result[0][0]
|