mirror of
https://github.com/clearml/clearml-serving
synced 2025-01-31 02:46:54 +00:00
Removes unnessary flatten (#50)
This commit is contained in:
parent
6fb0006776
commit
41df4eb287
@ -31,7 +31,7 @@ class Preprocess(object):
|
|||||||
image = Image.open(local_file)
|
image = Image.open(local_file)
|
||||||
|
|
||||||
image = ImageOps.grayscale(image).resize((28, 28))
|
image = ImageOps.grayscale(image).resize((28, 28))
|
||||||
return np.array([np.array(image).flatten()])
|
return np.array([np.array(image)])
|
||||||
|
|
||||||
def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
|
def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
|
||||||
# post process the data returned from the model inference engine
|
# post process the data returned from the model inference engine
|
||||||
|
@ -31,7 +31,7 @@ class Preprocess(object):
|
|||||||
image = Image.open(local_file)
|
image = Image.open(local_file)
|
||||||
|
|
||||||
image = ImageOps.grayscale(image).resize((28, 28))
|
image = ImageOps.grayscale(image).resize((28, 28))
|
||||||
return np.array([np.array(image).flatten()])
|
return np.array([np.array(image)])
|
||||||
|
|
||||||
def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
|
def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
|
||||||
# post process the data returned from the model inference engine
|
# post process the data returned from the model inference engine
|
||||||
|
Loading…
Reference in New Issue
Block a user