Skip to content

Instantly share code, notes, and snippets.


Dillon Erb dte

Block or report user

Report or block dte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Q, P = Q_net() = Q_net(), P_net(0) # Encoder/Decoder
D_gauss = D_net_gauss() # Discriminator adversarial
if torch.cuda.is_available():
Q = Q.cuda()
P = P.cuda()
D_cat = D_gauss.cuda()
D_gauss = D_net_gauss().cuda()
# Set learning rates
gen_lr, reg_lr = 0.0006, 0.0008
import os
from flask import Flask, redirect, url_for, request, render_template, send_from_directory
from werkzeug import secure_filename
import not_hotdog_model
# todo: more pretty interface
# folder to upload pictures
UPLOAD_FOLDER = 'uploads/'
# what files can upload
dte /
Created May 9, 2018
Vectorization and Broadcasting with Pytorch
import torch
from torch.nn.functional import cosine_similarity
def embeddings_to_cosine_similarity_matrix(E):
Converts a a tensor of n embeddings to an (n, n) tensor of similarities.
similarities = [[cosine_similarity(a, b, dim=0) for a in E] for b in E]
similarities = list(map(, similarities))
return torch.stack(similarities)

Release Notes

New Thing 2


About this

New Thing 2


About this


Keybase proof

I hereby claim:

  • I am dte on github.
  • I am dte ( on keybase.
  • I have a public key ASBUHk4r10yK56bUqf0cZ9iYkVdIqehPtxMHsTcvtYp4awo

To claim this, I am signing this object:

You can’t perform that action at this time.