You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/04/18 12:47:55 UTC

[GitHub] crazyleg opened a new issue #10602: mxnet.model.server custom Service model.get_outputs() returns only one result

crazyleg opened a new issue #10602:  mxnet.model.server custom Service model.get_outputs() returns only one result
URL: https://github.com/apache/incubator-mxnet/issues/10602
 
 
   ## Description
   When using mxnet.model.server custom Service model.get_outputs() returns only one result, while data supplied to self.mx_model.forward(DataBatch(data), is_train=False) has a list of many.
   
   ## Environment info (Required)
   
   I assume not required here
   I'am using Python.
   
   ## Minimum reproducible example
       def _inference(self, data):
          
           data = [item.as_in_context(self.ctx) for item in data]
           #print(len(data)) gives 100
           #print(len(DataBatch(data).data)) gives 100
         
           self.mx_model.forward(DataBatch(data), is_train=False)
           q = self.mx_model.get_outputs()
   
           #print(len(q)) gives 1
      
           return self.mx_model.get_outputs()
   
   ## What have you tried to solve it?
   
   Currently I am iterating over data and wrap each separate sample into DataBatch and run separate inference. While this works, I assume that running forward with full DataBatch will give better performance.
   
   How should I do model.forward(DataBatch(data)) to get a list of outputs that is equal to len(data) ? Looks like a problem.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services