ee4ce8e9d9a439b9a87fcfa6abdcb0f7f3f62b11,torch/onnx/symbolic_opset9.py,,embedding,#Any#Any#Any#Any#Any#Any#,474
Before Change
def embedding(g, weight, indices, padding_idx, scale_grad_by_freq, sparse):
return g.op("Gather", weight, indices)
@parse_args("v", "v", "v", "i", "i", "i", "v", "i")
def embedding_bag(g,
After Change
// auto out = weight.index_select(0, indices.reshape(-1));
// zerofill_padding(out);
// return out.view(size);
weight = g.op("Gather", weight, indices)
if (padding_idx >= 0):
mask = eq(g, indices, g.op("Constant", value_t=torch.tensor(padding_idx)))
if sym_help._export_onnx_opset_version < 11:
mask = unsqueeze(g, mask, -1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: pytorch/pytorch
Commit Name: ee4ce8e9d9a439b9a87fcfa6abdcb0f7f3f62b11
Time: 2021-03-12
Author: bowbao@microsoft.com
File Name: torch/onnx/symbolic_opset9.py
Class Name:
Method Name: embedding
Project Name: comic/grand-challenge.org
Commit Name: cb87281c359c38765681b201a431fe750aa01e72
Time: 2018-09-06
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/datasets/utils.py
Class Name:
Method Name: infer_type
Project Name: analysiscenter/batchflow
Commit Name: fe64b49aceed4b5eef801c51e61caee38d0fc600
Time: 2019-12-23
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/torch/layers/resize.py
Class Name: Combine
Method Name: forward