• Adam Rogowiec's avatar
    [ONNX] Activation functions parameters for LSTM. (#2842) · dddcd4a8
    Adam Rogowiec authored
    * Move HardSigmoid to nGraph fused operators.
    
    * UT for HardSigmoid fused operator.
    
    * Add type_prop UT.
    
    * Activation function parameters and hardsigmoid activation function.
    
    * UT for lstm with hardsigmoid activation function.
    
    * Reorder operations in implementation.
    
    * Fix unit tests.
    
    * Fix typo.
    
    * Change stored activation function to pure function pointer.
    
    * Apply style-check.
    
    * [ONNX] Refactor LSTM tests to use NgraphTestCase
    
    * Enable passing instance values to comparator
    
    * Style apply.
    
    * Fix style, syntax
    
    * Change order of class member to fix errors.
    
    * Switch to single-precision parameters.
    
    * Disable unit test for IGPU.
    dddcd4a8
lstm_fwd_hardsigmoid_activation.prototxt 2.48 KB
ir_version: 4
producer_name: "nGraph ONNX Importer"
graph {
  node {
    input: "X"
    input: "W"
    input: "R"
    output: "Y"
    output: "Y_h"
    output: "Y_c"
    op_type: "LSTM"
    attribute {
      name: "activation_alpha"
      floats: 0.375
      type: FLOATS
    }
    attribute {
      name: "activation_beta"
      floats: 0.748
      type: FLOATS
    }
    attribute {
      name: "activations"
      strings: "HardSigmoid"
      strings: "Tanh"
      strings: "Tanh"
      type: STRINGS
    }
    attribute {
      name: "direction"
      s: "forward"
      type: STRING
    }
    attribute {
      name: "hidden_size"
      i: 2
      type: INT
    }
    attribute {
      name: "input_forget"
      i: 0
      type: INT
    }
  }
  name: "compute_graph"
  input {
    name: "X"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 2
          }
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  input {
    name: "W"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 8
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  input {
    name: "R"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 8
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  output {
    name: "Y"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 2
          }
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  output {
    name: "Y_h"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
  output {
    name: "Y_c"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 1
          }
          dim {
            dim_value: 2
          }
        }
      }
    }
  }
}
opset_import {
  version: 7
}