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
'''Train a simple deep CNN on the CIFAR10 small images dataset.
GPU run command:
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python cifar10_cnn.py
It gets down to 0.65 test logloss in 25 epochs, and down to 0.55 after 50 epochs.
(it's still underfitting at that point, though).
Note: the data was pickled with Python 2, and some encoding issues might prevent you
from loading it in Python 3. You might have to load it in Python 2,
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
__weights_dict = dict()
def load_weights(weight_file):
if weight_file == None:
return
import tensorflow as tf
__weights_dict = dict()
is_train = False
def load_weights(weight_file):
import numpy as np
if weight_file == None:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 23 columns, instead of 3 in line 3.
id,conversation_id,created_at,date,time,timezone,user_id,username,name,place,tweet,mentions,urls,photos,replies_count,retweets_count,likes_count,location,hashtags,link,retweet,quote_url,video
1124775205698719744,1124775205698719744,1557002281000,2019-05-04,15:38:01,CDT,788898706586275840,tdatascience,Towards Data Science,,Optimal Control: LQR by @vlastelicap https://buff.ly/2ZT45ud ,['vlastelicap'],['https://buff.ly/2ZT45ud'],[],0,0,1,,[],https://twitter.com/TDataScience/status/1124775205698719744,,,0
1124733938625384448,1124733938625384448,1556992442000,2019-05-04,12:54:02,CDT,788898706586275840,tdatascience,Towards Data Science,,Who owns your health data? https://buff.ly/2Ywezz0 🖊by @jaynew_l #healthcare #BigData #TDSPick 🎲 pic.twitter.com/C2BbVyvyky,['jaynew_l'],['https://buff.ly/2Ywezz0'],['https://pbs.twimg.com/media/D5vbjoVW4AA0FzV.jpg'],0,1,0,,"['#healthcare', '#bigdata', '#tdspick']",https://twitter.com/TDataScience/status/1124733938625384448,,,0
1124697946887532544,1124697946887532544,1556983861000
install.packages("remotes")
remotes::install_github("JohnCoene/g2r")
# So normally this is what you do for getting a plot with ggplot2
library(ggplot2)
ggplot(iris, aes(Petal.Length, Petal.Width, color = Species)) +
geom_point() +
facet_wrap(.~Species)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.