Skip to content

Instantly share code, notes, and snippets.

View shashankg7's full-sized avatar

Shashank Gupta shashankg7

View GitHub Profile
@rom1504
rom1504 / distributed_dalle2_laion.md
Last active September 18, 2024 23:33
distributed dalle2 laion
@bonlime
bonlime / get_Imagenet.sh
Last active November 2, 2024 21:41 — forked from BIGBALLON/extract_ILSVRC.sh
script for ImageNet data extract.
#!/bin/bash
#
# script to fully prepare ImageNet dataset
## 1. Download the data
# get ILSVRC2012_img_val.tar (about 6.3 GB). MD5: 29b22e2961454d5413ddabcf34fc5622
# wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar
# get ILSVRC2012_img_train.tar (about 138 GB). MD5: 1d675b47d978889d74fa0da5fadfb00e
# wget https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_train.tar
@tgsmith61591
tgsmith61591 / ranking.py
Last active March 21, 2024 06:36
Ranking metrics for recommender systems
# -*- coding: utf-8 -*-
#
# Author: Taylor G Smith
#
# Recommender system ranking metrics derived from Spark source for use with
# Python-based recommender libraries (i.e., implicit,
# http://github.com/benfred/implicit/). These metrics are derived from the
# original Spark Scala source code for recommender metrics.
# https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/evaluation/RankingMetrics.scala
@scapegoat06
scapegoat06 / TopicModelZoo.md
Created February 23, 2018 08:25
Topic Model Zoo
@kumarbhrgv
kumarbhrgv / draft.md
Last active February 1, 2022 14:47
Diversity in Recommendation Systems

Improvising diversity of personalized recommendation systems

Recent Research papers:

  • Improving Aggregate Recommendation Diversity Using Ranking-Based Techniques:

    107 Citations : IEEE Transactions on Knowledge and Data Engineering
    we introduce and explore a number of item ranking techniques that can generate substantially more diverse recommendations across all users while maintaining comparable levels of recommendation accuracy. Comprehensive empirical evaluation consistently shows the diversity gains of the proposed techniques using several real-world rating data sets and different rating prediction algorithms

  • Recommendation Diversification Using Explanations: (Data Engineering, 2009. ICDE '09. IEEE 25th International Conference)

Traditionally, the problem is addressed through attribute-based diversification grouping items in the result set that share many common attributes (e.g., genre for movies) and selecting only a limited number of items from each group. It is, however,

@hal3
hal3 / mini_sequence_labeler.py
Last active January 24, 2019 20:56
PyTorch implementation of a sequence labeler (POS taggger).
"""
PyTorch implementation of a sequence labeler (POS taggger).
Basic architecture:
- take words
- run though bidirectional GRU
- predict labels one word at a time (left to right), using a recurrent neural network "decoder"
The decoder updates hidden state based on:
- most recent word
@dirko
dirko / keras_unidirectional_tagger.py
Created August 11, 2016 05:28
Keras LSTM NER tagger
# Keras==1.0.6
import numpy as np
from keras.models import Sequential
from keras.layers.recurrent import LSTM
from keras.layers.core import TimeDistributedDense, Activation
from keras.preprocessing.sequence import pad_sequences
from keras.layers.embeddings import Embedding
from sklearn.cross_validation import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score, precision_recall_fscore_support
@udibr
udibr / gruln.py
Last active November 7, 2020 02:34
Keras GRU with Layer Normalization
import numpy as np
from keras.layers import GRU, initializations, K
from collections import OrderedDict
class GRULN(GRU):
'''Gated Recurrent Unit with Layer Normalization
Current impelemtation only works with consume_less = 'gpu' which is already
set.
# Arguments
@shagunsodhani
shagunsodhani / KeyValueMemNN.md
Last active April 30, 2023 04:13
Summary of paper "Key-Value Memory Networks for Directly Reading Documents"

Key-Value Memory Networks for Directly Reading Documents

Introduction

  • Knowledge Bases (KBs) are effective tools for Question Answering (QA) but are often too restrictive (due to fixed schema) and too sparse (due to limitations of Information Extraction (IE) systems).
  • The paper proposes Key-Value Memory Networks, a neural network architecture based on Memory Networks that can leverage both KBs and raw data for QA.
  • The paper also introduces MOVIEQA, a new QA dataset that can be answered by a perfect KB, by Wikipedia pages and by an imperfect KB obtained using IE techniques thereby allowing a comparison between systems using any of the three sources.
  • Link to the paper.

Related Work

@anj1
anj1 / subexpr.py
Last active January 20, 2020 22:41
import types
import tensorflow as tf
import numpy as np
# Expressions are represented as lists of lists,
# in lisp style -- the symbol name is the head (first element)
# of the list, and the arguments follow.
# add an expression to an expression list, recursively if necessary.
def add_expr_to_list(exprlist, expr):