Skip to content

Instantly share code, notes, and snippets.

yura yurkor

  • san francisco
Block or report user

Report or block yurkor

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
View iterate_minibatches.py
def iterate_minibatches(inputs, targets, batchsize, shuffle=False):
assert len(inputs) == len(targets)
while True:
if shuffle:
indices = np.arange(len(inputs))
np.random.shuffle(indices)
for start_idx in range(0, len(inputs) - batchsize + 1, batchsize):
if shuffle:
excerpt = indices[start_idx:start_idx + batchsize]
else:
@yurkor
yurkor / 3d_images_match.py
Last active Jul 13, 2016
avito_deep_learning
View 3d_images_match.py
"""
train on seq_of_iamges vs seq_of_images -> {0,1} sigmoid or contrastive_loss
"""
# model.load_weights("checkpoint_model.h5")
def euclidean_distance(vects):
x, y = vects
return K.sqrt(K.sum(K.square(x - y), axis=1, keepdims=True))
You can’t perform that action at this time.