Browse Source
Update
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
training
1 changed files with
0 additions and
2 deletions
-
resnet50_image_embedding.py
|
@ -31,8 +31,6 @@ class Resnet50ImageEmbedding(Operator): |
|
|
sys.path.append(str(Path(__file__).parent)) |
|
|
sys.path.append(str(Path(__file__).parent)) |
|
|
if framework == 'pytorch': |
|
|
if framework == 'pytorch': |
|
|
from pytorch.model import Model |
|
|
from pytorch.model import Model |
|
|
if framework == 'tensorflow': |
|
|
|
|
|
from tensorflow.model import Model |
|
|
|
|
|
self.model = Model(model_name) |
|
|
self.model = Model(model_name) |
|
|
|
|
|
|
|
|
def __call__(self, img_tensor: torch.Tensor) -> NamedTuple('Outputs', [('cnn', numpy.ndarray)]): |
|
|
def __call__(self, img_tensor: torch.Tensor) -> NamedTuple('Outputs', [('cnn', numpy.ndarray)]): |
|
|