Skip to content

Instantly share code, notes, and snippets.

View qks1lver's full-sized avatar

Jiun Yen qks1lver

View GitHub Profile
@macromaniac
macromaniac / regression.py
Created September 17, 2016 18:47
simple linear regression example using keras
import numpy as np
from keras.layers import Dense, Input
from keras.models import Model
x = Input((1,))
y = Dense(1, activation ='linear')(x)
m = Model(x,y)
m.compile(loss = 'mse', optimizer='sgd')
_x = np.linspace(1,2, num = 1e3)