Skip to content

Instantly share code, notes, and snippets.

View adriaciurana's full-sized avatar

Adrià Ciurana Lanau adriaciurana

  • Canva
  • Sydney, NSW, Australia
  • 07:02 (UTC +10:00)
View GitHub Profile
@adriaciurana
adriaciurana / model.py
Last active January 23, 2019 10:06
Medium Articulo: Parte 2
# Cargamos la clase para generar modelos sequenciales
from keras.models import Sequential
# Cargamos las siguientes capas
from keras.layers import Conv2D, MaxPooling2D, Dense, Flatten
model = Sequential()
# Bloque 1:
# - Conv1a: neuronas=128, ventana=(3,3), activacion=ReLU.
# - Conv1b: neuronas=256, ventana=(3,3), activacion=ReLU.
# - Max-pooling: ventana=(3,3), stride=2.
@adriaciurana
adriaciurana / dataset_loading.py
Last active January 23, 2019 10:15
Medium Articulo: Crear CNN, figura 1
import numpy as np
import keras
from keras.preprocessing.image import ImageDataGenerator
# Indicamos Cada correspondiente carpeta
TRAIN_FOLDER = './dogscats/train/'
VAL_FOLDER = './dogscats/valid/'
# Indicamos como se cogeran las imagenes de entrenamiento y si habrá data-aumentation.
# Basicamente para tener más ejemplos,
@adriaciurana
adriaciurana / RBM.ipynb
Created November 1, 2018 17:32
RBM para bigneuralvision.com
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adriaciurana
adriaciurana / Test SVD
Created May 30, 2018 15:03
Post 2 BigNeuralNetwork
A = roty(-30); B = 2; C = rotx(45);
[A2, B2, C2] = svd(A*B*C);
if(sum(sum(abs(A2)-abs(A))) < 1e-10 && ...
sum(sum(abs(B2)-abs(B))) < 1e-10 && ...
sum(sum(abs(C2)-abs(C))) < 1e-10)
disp('La descomposicion da como resultado A, B, C iguales en magnitud');
end
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from mpl_toolkits.mplot3d import Axes3D
# numero iteraciones
ITERS = 10000
# learning rate
LR = 0.0000000001