fea8a203373b48d3d0f0c6770adb2c52815e73ff,onnx_coreml/_operators.py,,_convert_pad,#Any#Any#,362
Before Change
elif mode == "edge":
mode = "replication"
pads = node.attrs["pads"]
if len(pads) > 4:
diff = len(pads) - 4
if pads[:diff].count(0) != diff:
raise NotImplementedError(
"Paddings value {} not supported".format(pads,)
)
pads = pads[diff:]
pad_t = pads[0]
pad_b = pads[1]
pad_l = 0
pad_r = 0
After Change
assert len(pads) % 2 == 0 and len(pads) >= 2
start = pads[:len(pads)//2]
end = pads[len(pads)//2:]
if len(start) < 2:
start.append(0)
end.append(0)
def _all_zero(x):
return x.count(0) == len(x)
if not _all_zero(start[:-2]) and not _all_zero(end[:-2]):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: onnx/onnx-coreml
Commit Name: fea8a203373b48d3d0f0c6770adb2c52815e73ff
Time: 2017-12-02
Author: dzhulgakov@fb.com
File Name: onnx_coreml/_operators.py
Class Name:
Method Name: _convert_pad
Project Name: AlexsLemonade/refinebio
Commit Name: bf4d4be450616eeb0252b276c9febc4a50e83ace
Time: 2020-07-06
Author: willvauclain.dev@gmail.com
File Name: api/data_refinery_api/views/dataset.py
Class Name:
Method Name: validate_dataset
Project Name: Pinafore/qb
Commit Name: 2f74f04253d5a90459401d0f09ea0559d50371a0
Time: 2016-06-25
Author: ski.rodriguez@gmail.com
File Name: util/guess.py
Class Name: GuessList
Method Name: check_recall