code: def _get_lstm_weight_param_summary(lstm_wp):
      weight_name_list = [
          "W_i",
          "W_f",
          "W_z",
          "W_o",
          "H_i",
          "H_f",
          "H_z",
          "H_o",
          "b_i",
          "b_f",
          "b_z",
          "b_o",
          "p_i",
          "p_f",
          "p_o",
      ]
      wp_summary_list = [
          _get_weight_param_summary(lstm_wp.inputGateWeightMatrix),
          _get_weight_param_summary(lstm_wp.forgetGateWeightMatrix),
          _get_weight_param_summary(lstm_wp.blockInputWeightMatrix),
          _get_weight_param_summary(lstm_wp.outputGateWeightMatrix),
          _get_weight_param_summary(lstm_wp.inputGateRecursionMatrix),
          _get_weight_param_summary(lstm_wp.forgetGateRecursionMatrix),
          _get_weight_param_summary(lstm_wp.blockInputRecursionMatrix),
          _get_weight_param_summary(lstm_wp.outputGateRecursionMatrix),
          _get_weight_param_summary(lstm_wp.inputGateBiasVector),
          _get_weight_param_summary(lstm_wp.forgetGateBiasVector),
          _get_weight_param_summary(lstm_wp.blockInputBiasVector),
          _get_weight_param_summary(lstm_wp.outputGateBiasVector),
          _get_weight_param_summary(lstm_wp.inputGatePeepholeVector),
          _get_weight_param_summary(lstm_wp.forgetGatePeepholeVector),
          _get_weight_param_summary(lstm_wp.outputGatePeepholeVector),
      ]
      lstm_wp_summary_list = []
      for idx, summary in enumerate(wp_summary_list):
          if len(summary) > 0:
              lstm_wp_summary_list.append(
                  weight_name_list[idx] + ", " + summary
              )
  
      return ("\n" + " " * 8).join(lstm_wp_summary_list)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/spec_inspection_utils.py
imports: from __future__ import print_function
  from ...proto import NeuralNetwork_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _get_lstm_weight_param_summary(lstm_wp) and returns: unknown