1ef3ad90a3423ed15ca41e0ea4e81012ebe84a9f,catalyst/data/scripts/project_embeddings.py,,main,#Any#Any#,88

Before Change


        img_data = np.stack(
            [load_image(name, args.img_size) for name in image_names], axis=0
        )
        img_data = (
            img_data.transpose((0, 3, 1, 2)) / 255.0  // noqa: WPS432
        ).astype(np.float32)
        img_data = torch.from_numpy(img_data)
    else:
        img_data = None

After Change


    if args.num_rows is not None:
        indices = np.random.choice(len(df), args.num_rows)
        features = features[indices, :]
        df = df.iloc[indices]

    if args.img_col is not None:
        img_data = _load_image_data(
            rootpath=args.img_rootpath, paths=df[args.img_col].values
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: catalyst-team/catalyst
Commit Name: 1ef3ad90a3423ed15ca41e0ea4e81012ebe84a9f
Time: 2020-08-11
Author: scitator@gmail.com
File Name: catalyst/data/scripts/project_embeddings.py
Class Name:
Method Name: main


Project Name: OpenNMT/OpenNMT-py
Commit Name: 668c3ef362995c55633fde592354160fec1d1efd
Time: 2019-06-27
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/transformer.py
Class Name: TransformerDecoder
Method Name: forward


Project Name: chainer/chainercv
Commit Name: 493aef6b9965bd4fd83fac8a4cdd790b2d8010e2
Time: 2019-06-26
Author: shinichiro.hamaji@gmail.com
File Name: chainercv/links/connection/seblock.py
Class Name: SEBlock
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 2c3dd6f3bd666bf7aeee2786dd00bc577b08bc0e
Time: 2017-06-26
Author: srush@sum1gpu02.rc.fas.harvard.edu
File Name: onmt/Models.py
Class Name: TransformerDecoder
Method Name: forward