Skip to content

Instantly share code, notes, and snippets.

View ibrahim5253's full-sized avatar

Ibrahim ibrahim5253

  • Hyderabad
View GitHub Profile
@ibrahim5253
ibrahim5253 / vector_ref.cpp
Created February 25, 2021 04:00
`std::vector<T&>`; because, why not?
#include <iostream>
#include <vector>
namespace std {
template<class T>
class vector<T&> {
public:
vector() : data(new T*[capacity]) {}
@ibrahim5253
ibrahim5253 / dsw.h
Created January 16, 2021 17:05
DSW Algorithm (in-place linear time BST balancing)
#include <memory>
template<class T>
struct node {
T val;
node *left;
node *right;
node() : left(nullptr), right(nullptr) {}
node(T v) : val(v), left(nullptr), right(nullptr) {}
Dataset Number of vertices Number of Edges Clustering Lower bound Upper Bound
AS-733 6474 13895 greedy 7 14
Amazon 262111 1234877 multilevel 19
Karate Club 34 78 multilevel 3 3
Word Adjecency 111 multilevel 3 6
@ibrahim5253
ibrahim5253 / Progress.md
Last active July 10, 2017 20:07
Improving VAE by generative adverserial training

Improving VAE by generative adverserial training

Objective

VAEs and GANs are among the few generative models, that have attracted a lot of attention in the past few years. A VAE is good at reconstruction but suffers from blurry images that are the immediate result of pixel-wise MSE in its cost function that imposes an implicit guassian prior. A GAN, on the other hand, replaces this pixel-wise similarity with representations that are learned by its discriminator which is an adversary for the generator. Because of the complex features learned by the discriminator, the generations are quite sharp, but since there is practically no way to know what the discriminator is learning, the generated images may be far from that in the real world. Generator only tries to match the representation of its generation (as seen by the discriminator) with that of the real images.

Keeping in view, the rather complementary features of VAEs and GANs, there have been several attempts at combining these two models to get th

@ibrahim5253
ibrahim5253 / model.txt
Created July 9, 2017 16:57
Error with getParameters()
{
1 :
{
gradInput : FloatTensor - empty
modules :
{
1 :
{
weight : FloatTensor - size: 8192x100
_type : "torch.FloatTensor"