3e87c9fa4d0c0f181734e0a053e8cd41b0849717,tensorboardX/embedding.py,,make_sprite,#Any#Any#,24

Before Change


    from PIL import Image
    // this ensures the sprite image has correct dimension as described in
    // https://www.tensorflow.org/get_started/embedding_viz
    nrow = int(math.ceil((label_img.size(0)) ** 0.5))
    arranged_img_CHW = make_grid(make_np(label_img), ncols=nrow)

    // augment images so that //images equals nrow*nrow
    arranged_augment_square_HWC = np.ndarray((arranged_img_CHW.shape[2], arranged_img_CHW.shape[2], 3))

After Change


    //    as images to be shown.
    // args: label_img: tensor in NCHW

    assert label_img.shape[2] == label_img.shape[3], "Image should be square, see tensorflow/tensorboard/먶"
    total_pixels = label_img.shape[0] * label_img.shape[2] * label_img.shape[3]
    pixels_one_side = total_pixels ** 0.5
    number_of_images_per_row = int(math.ceil(pixels_one_side / label_img.shape[3]))
    arranged_img_CHW = make_grid(make_np(label_img), ncols=number_of_images_per_row)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 3

Instances


Project Name: lanpa/tensorboardX
Commit Name: 3e87c9fa4d0c0f181734e0a053e8cd41b0849717
Time: 2019-08-21
Author: huang.dexter@gmail.com
File Name: tensorboardX/embedding.py
Class Name:
Method Name: make_sprite


Project Name: HsinYingLee/DRIT
Commit Name: 8a04fa2c91f52a9c551849812d450079e667b16a
Time: 2018-07-28
Author: hytseng0509@gmail.com
File Name: src/networks.py
Class Name: LayerNorm
Method Name: forward


Project Name: rusty1s/pytorch_geometric
Commit Name: 7b4892781e2198ad99a8655da03133505619040a
Time: 2020-06-28
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_arma_conv.py
Class Name:
Method Name: test_arma_conv


Project Name: open-mmlab/mmdetection
Commit Name: a6236b789b8f4e2e66c8379199f40ecef9afce06
Time: 2020-04-21
Author: 40779233+ZwwWayne@users.noreply.github.com
File Name: mmdet/core/anchor/anchor_generator.py
Class Name: AnchorGenerator
Method Name: valid_flags


Project Name: rusty1s/pytorch_geometric
Commit Name: 6b8b2026f4501c3d6b62031c79ee38dd64955e1f
Time: 2019-04-02
Author: kuynzereb@gmail.com
File Name: torch_geometric/nn/conv/message_passing.py
Class Name: MessagePassing
Method Name: propagate


Project Name: rusty1s/pytorch_geometric
Commit Name: 18f7a20f9098da9bd848e31b501b6b1c571accc1
Time: 2020-06-27
Author: matthias.fey@tu-dortmund.de
File Name: test/nn/conv/test_appnp.py
Class Name:
Method Name: test_appnp


Project Name: pytorch/audio
Commit Name: 0e0d1e590e8cdae50d04a96617ea6601446f99fb
Time: 2018-12-25
Author: david@da3.net
File Name: torchaudio/transforms.py
Class Name: PadTrim
Method Name: __call__