43e740fa6ea915e7143b9e58a231042d22ab5587,opt_einsum/contract.py,,contract_path,#,14

Before Change


        if (cnum - len(path)) == -1:
            idx_result = output_subscript
        else:
            sort_result = [(dimension_dict[ind], ind) for ind in out_inds]
            idx_result = "".join([x[1] for x in sorted(sort_result)])

        shp_result = parser.find_output_shape(tmp_inputs, tmp_shapes, idx_result)

After Change


            idx_result = output_subscript
        else:
            // use tensordot order to minimize transpositions
            all_input_inds = "".join(tmp_inputs)
            idx_result = "".join(sorted(out_inds, key=all_input_inds.find))

        shp_result = parser.find_output_shape(tmp_inputs, tmp_shapes, idx_result)

        input_list.append(idx_result)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: dgasmith/opt_einsum
Commit Name: 43e740fa6ea915e7143b9e58a231042d22ab5587
Time: 2018-08-09
Author: john.gray.14@ucl.ac.uk
File Name: opt_einsum/contract.py
Class Name:
Method Name: contract_path


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 997875ab4734f08b153db53f4f3e546a7740a233
Time: 2020-11-04
Author: guillaumekln@users.noreply.github.com
File Name: opennmt/utils/misc.py
Class Name:
Method Name: get_variables_name_mapping


Project Name: jazzband/django-debug-toolbar
Commit Name: e40b2c0fbdbd932be5f9d0550a16b6652de0d38d
Time: 2008-09-18
Author: rhudson@orcasinc.com
File Name: debug_toolbar/panels/template.py
Class Name: TemplateDebugPanel
Method Name: content