keras-js icon indicating copy to clipboard operation
keras-js copied to clipboard

Reshape layer with -1 throws assertion error

Open burgalon opened this issue 7 years ago • 0 comments

When using a model.json with a Reshape layer like the below code, the code here throws an exception because the reduce cannot calculate currectly.

I would love to submit a pull request to fix this if someone can guide me in the right direction.

      {
        "name": "reshape_5",
        "class_name": "Reshape",
        "config": {
          "name": "reshape_5",
          "trainable": true,
          "target_shape": [
            -1,
            12
          ]
        },
        "inbound_nodes": [
          [
            [
              "conv2d_624",
              0,
              0,
              {}
            ]
          ]
        ]
      },

burgalon avatar May 29 '17 12:05 burgalon