mmdnn/conversion/tensorflow/rewriter/gru_rewriter.py [22:49]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        kwargs['num_units'] = num_units
        kwargs['input_size'] = input_size

        if hasattr(top_node, 'kwargs'):
            top_node.kwargs.update(kwargs)
        else:
            top_node.kwargs = kwargs


    def process_rnn_h_zero(self, match_result):
        if 'h_zero' not in match_result._name_to_pattern.keys():
            return
        kwargs = dict()
        top_node = match_result._pattern_to_op[match_result._name_to_pattern['h_zero']]

        fill_size = match_result.get_op('fill_size')
        fill_value = match_result.get_op('fill_value')

        kwargs['fill_size'] = fill_size.get_attr('value').int_val[0]
        kwargs['fill_value'] = fill_value.get_attr('value').float_val[0]

        if hasattr(top_node, 'kwargs'):
            top_node.kwargs.update(kwargs)
        else:
            top_node.kwargs = kwargs


    def process_match_result(self, match_result, pattern_name):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mmdnn/conversion/tensorflow/rewriter/lstm_rewriter.py [26:53]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        kwargs['num_units'] = num_units
        kwargs['input_size'] = input_size

        if hasattr(top_node, 'kwargs'):
            top_node.kwargs.update(kwargs)
        else:
            top_node.kwargs = kwargs


    def process_rnn_h_zero(self, match_result):
        if 'h_zero' not in match_result._name_to_pattern.keys():
            return
        kwargs = dict()
        top_node = match_result._pattern_to_op[match_result._name_to_pattern['h_zero']]
        
        fill_size = match_result.get_op('fill_size')
        fill_value = match_result.get_op('fill_value')

        kwargs['fill_size'] = fill_size.get_attr('value').int_val[0]
        kwargs['fill_value'] = fill_value.get_attr('value').float_val[0]

        if hasattr(top_node, 'kwargs'):
            top_node.kwargs.update(kwargs)
        else:
            top_node.kwargs = kwargs


    def process_match_result(self, match_result, pattern_name):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



