Skip to content

Instantly share code, notes, and snippets.

View FavioVazquez's full-sized avatar
💻
Changing the world :)

Favio André Vázquez FavioVazquez

💻
Changing the world :)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
In this article, we’ll introduce the reader to Generative Adversarial Networks (GANs). We assume the reader has some prior experience with neural networks, such as artificial neural networks.
Here’s the plan of attack:
Introduction to Generative Adversarial Networks
The Discriminative Model
The Generative Model
How GANs Work
Different types of GANs
#library(devtools)
#install_github("ropensci/drake")
library(dplyr)
library(ggplot2)
library(drake)
# Donwload neccesary data
drake_example("main")
---
title: "Example R Markdown drake file target"
author: Will Landau, Kirill Müller and Favio ;)
output: html_document
---
Run `make.R` to generate the output `report.pdf` and its dependencies. Because we use `loadd()` and `readd()` below, `drake` knows `report.pdf` depends on targets `fit`, and `hist`.
```{r content}
library(drake)
import os
import sys
import random
import math
import numpy as np
import skimage.io
import matplotlib
import matplotlib.pyplot as plt
import coco
Day Topics Blog post with explanations Code for the day
1 Intro to object oriented programming, classes, inheritance Day 1 Code day 1
2 Class methods, instance methods, static methods, using class methods as alternative constructors Day 2 Code day 2
3 Function annotations Day 3 Code day 3
4 To-string conversion, __repr__, __str__ Day 4 [Code day 4](https://githu
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
class Net(nn.Module):
def __init__(self):
'''Trains a simple convnet on the MNIST dataset.
Gets to 99.25% test accuracy after 12 epochs
(there is still a lot of margin for parameter tuning).
16 seconds per epoch on a GRID K520 GPU.
'''
from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.datasets import mnist
from autokeras.classifier import ImageClassifier
if __name__ == '__main__':
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train = x_train.reshape(x_train.shape + (1,))
x_test = x_test.reshape(x_test.shape + (1,))
clf = ImageClassifier(verbose=True, augment=False)
clf.fit(x_train, y_train, time_limit=12 * 60 * 60)