2e49a9c0c5beae53787aaf2c87c85f5d0412e867,src/graph_transpiler/webdnn/graph/place_holder.py,PlaceHolder,__ne__,#PlaceHolder#Any#,355

Before Change


            raise ValueError("First operand is unresolved placeholder. It can"t be compared.")

        if isinstance(other, PlaceHolder):
            if not other.is_resolved:
                raise ValueError("Second operand is unresolved placeholder. It can"t be compared.")

            return self.value != other.value

        else:
            return self.value != other

After Change


        return self.value == PlaceHolder.force_int(other)

    def __ne__(self, other: Union[int, "PlaceHolder"]) -> bool:
        if not self.is_resolved or not PlaceHolder.check_resolved(other):
            return id(self) != id(other)

        return self.value != PlaceHolder.force_int(other)

    def __gt__(self, other: Union[int, "PlaceHolder"]) -> bool:
        if not self.is_resolved:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: mil-tokyo/webdnn
Commit Name: 2e49a9c0c5beae53787aaf2c87c85f5d0412e867
Time: 2017-06-19
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/graph/place_holder.py
Class Name: PlaceHolder
Method Name: __ne__


Project Name: mil-tokyo/webdnn
Commit Name: 2e49a9c0c5beae53787aaf2c87c85f5d0412e867
Time: 2017-06-19
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/backend/code_generator/injectors/meta_injector.py
Class Name: MetaInjector
Method Name: _generate_buffer


Project Name: mil-tokyo/webdnn
Commit Name: 2e49a9c0c5beae53787aaf2c87c85f5d0412e867
Time: 2017-06-19
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/graph/place_holder.py
Class Name: PlaceHolder
Method Name: __eq__