KineticCookie commented on issue #9361: infer_shape error for 'resnet-152'
URL: 
https://github.com/apache/incubator-mxnet/issues/9361#issuecomment-357217016
 
 
   I executed your snippet, and I can't find information about shapes model was 
trained with.
   ```
   ResNetV2(
     (features): HybridSequential( /* layer attributes */)
     (output): Dense(2048 -> 1000, linear)
   )
   ```
   Layer attribute doesn't contain information to get a model input and output 
shape. Moreover I can't find a data types for each layer.
   
   I made an additional search and found this issue #7641 with @jeremiedb 
explaining shapes implementation:
   > There's typically no need to specify shape of data input when building the 
symbolic network. This will typically will be set at training time when the 
model is bind and the shapes infered from what the iterator provides as input 
data. This allows the same network to be trained with different batch sizes.
   
   Seems like mxnet infers information about shapes and data types at training, 
but doesn't store it in model files. `infer_[shape, type]` methods are the only 
way to get this info, but they require hardcoded variables.
   
   I try to implement Tensorflow Serving-like server that could handle any 
exported mxnet model, and serve it via HTTP api. But to do this I need to know:
   1. What data model is waiting for? (name of input, shape of input, data type 
of input) So server can prepare user data to be passed to inference method.
   2. What model will return after inference? (name of output, shape of output, 
data type of ouput) So clients of my server expect some specified values to 
return after they send a request.
   
   If I put away my serving case: I got a mxnet model from datascientist to use 
in my app. Model ships with no documentation. I can't contact datascientist 
either. Is there any way to use this mxnet model, considering I have no clue 
what data was used to train this model?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to