sugi1229 opened a new issue #10516: How to run model trained with python on 
Scala
URL: https://github.com/apache/incubator-mxnet/issues/10516
 
 
   I trained model with python. I got xxxxx.params and xxxxx.json files.
   However, there files coludn’t load scala.
   
   In this case same(https://github.com/apache/incubator-mxnet/issues/9859).
   At this issue, It is written that it can be solved by replacing attrs.
   
   I want to know how to convert json file.
   
   scala
   ```
   import ml.dmlc.mxnet._
   val sym = Symbol.load("mx_mlp-symbol.json")
   ```
   
   log
   ```
   [10:09:49] include/dmlc/./logging.h:308: [10:09:49] 
/mxnet/dmlc-core/include/dmlc/././json.h:842: JSONReader: Unknown field attrs, 
candidates are: 
   "attr"
   "backward_source_id"
   "control_deps"
   "inputs"
   "name"
   "op"
   "param"
   ```
   
   json file
   ```
   {
     "nodes": [
       {
         "op": "null", 
         "name": "data", 
         "inputs": []
       }, 
       {
         "op": "_copy", 
         "name": "id", 
         "inputs": [[0, 0, 0]]
       }, 
       {
         "op": "null", 
         "name": "in_stem_conv1_3*3_conv2d_weight", 
         "attrs": {
           "kernel": "(3, 3)", 
           "no_bias": "True", 
           "num_filter": "32", 
           "pad": "(0, 0)", 
           "stride": "(2, 2)"
         }, 
         "inputs": []
       }, 
       {
         "op": "Convolution", 
         "name": "in_stem_conv1_3*3_conv2d", 
         "attrs": {
           "kernel": "(3, 3)", 
           "no_bias": "True", 
           "num_filter": "32", 
           "pad": "(0, 0)", 
           "stride": "(2, 2)"
         }, 
         "inputs": [[1, 0, 0], [2, 0, 0]]
       }, 
   .
   .
   .
   .
   ```
   
   I used
   - Docker(mxnet/scala)
   latest(Apr.12, 2018)
   - scala
   mxnet-scala-native-parent-0.12.0-SNAPSHOT-javadoc.jar
   - Docker(mxnet/python)
   latest(Apr.12, 2018)
   - python: 
   python 3.6
   mxnet 1.1.0
   
   

----------------------------------------------------------------
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