69abb00b1264ad97c90eab8582b98b2ced5799b9,tensorboardX/embedding.py,,make_sprite,#Any#Any#,11
Before Change
// Dirty fix: no pixel are appended by make_grid call in save_image (https://github.com/pytorch/vision/issues/206)
xx = torchvision.utils.make_grid(torch.Tensor(1, 3, 32, 32), padding=0)
if xx.size(2) == 33:
sprite = torchvision.utils.make_grid(label_img, nrow=nrow, padding=0)
sprite = sprite[:, 1:, 1:]
torchvision.utils.save_image(sprite, os.path.join(save_path, "sprite.png"))
After Change
// https://www.tensorflow.org/get_started/embedding_viz
nrow = int(math.ceil((label_img.size(0)) ** 0.5))
label_img = torch.from_numpy(makenp(label_img)) //for other framework
// augment images so that //images equals nrow*nrow
label_img = torch.cat((label_img, torch.randn(nrow ** 2 - label_img.size(0), *label_img.size()[1:]) * 255), 0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: lanpa/tensorboardX
Commit Name: 69abb00b1264ad97c90eab8582b98b2ced5799b9
Time: 2017-12-29
Author: huang.dexter@gmail.com
File Name: tensorboardX/embedding.py
Class Name:
Method Name: make_sprite
Project Name: rusty1s/pytorch_geometric
Commit Name: dd97be0ed3c6f249df1df338e11567ac29a27339
Time: 2019-08-11
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/geodesic.py
Class Name:
Method Name: geodesic_distance
Project Name: geomstats/geomstats
Commit Name: d5398270501cd5d6e9880db5e15ebf407ddec5ee
Time: 2020-04-03
Author: hadizaatiti@gmail.com
File Name: examples/plot_expectation_maximisation_manifolds.py
Class Name:
Method Name: weighted_gmm_pdf