Skip to content

Commit

Permalink
more py fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rickfast committed Oct 12, 2023
1 parent 25842ca commit e97334c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions examples/pytorch-resnet/handler.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import ferrix
from ferrix import InferRequest, InferResponse, preprocessor, postprocessor

@preprocessor
def test(infer_input: InferRequest) -> InferRequest:
array = infer_input.inputs[0].as_numpy()

# do some shit

@ferrix.preprocessor
def test(infer_input: ferrix.InferRequest) -> ferrix.InferRequest:
return infer_input

@ferrix.postprocessor
def test_out(infer_output: ferrix.InferResponse) -> ferrix.InferResponse:
@postprocessor
def test_out(infer_output: InferResponse) -> InferResponse:
return infer_output

0 comments on commit e97334c

Please sign in to comment.