7d340e5d642a594df7fed1679576751807cadaaf,thinc/layers/hashembed.py,,forward,#Any#Any#Any#,40
Before Change
column: int = model.attrs["column"]
nV = E.shape[0]
input_shape = tuple(ids.shape)
if ids.ndim >= 2:
ids1d = model.ops.as_contig(ids[:, column], dtype="uint64") // type: ignore
else:
ids1d = cast(Ints1d, ids)
keys = model.ops.hash(ids1d, seed) % nV
vectors = E[keys].sum(axis=1)
drop_mask = cast(Floats2d, model.ops.get_dropout_mask((vectors.shape[1],), dropout))
vectors *= drop_mask
After Change
nN = ids.shape[0]
seed: int = model.attrs["seed"]
keys = model.ops.hash(ids, seed) % nV
dropout: Optional[float] = model.attrs.get("dropout_rate")
drop_mask = cast(Floats1d, model.ops.get_dropout_mask((nO,), dropout))
dropout = model.attrs.get("dropout_rate")
output = vectors[keys]
output *= drop_mask
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: explosion/thinc
Commit Name: 7d340e5d642a594df7fed1679576751807cadaaf
Time: 2020-01-28
Author: ines@ines.io
File Name: thinc/layers/hashembed.py
Class Name:
Method Name: forward
Project Name: arraiy/torchgeometry
Commit Name: 6ee3f1b0d2a6ebadc9e2f664354594342ab0805d
Time: 2020-11-21
Author: justanhduc@users.noreply.github.com
File Name: kornia/augmentation/augmentation.py
Class Name: RandomErasing
Method Name: __init__
Project Name: NifTK/NiftyNet
Commit Name: 26c519e695a80a5e16bb6e7466397f0a3d5768ca
Time: 2017-06-28
Author: r.gray@ucl.ac.uk
File Name: utilities/training_output.py
Class Name:
Method Name: QuantitiesToMonitor