# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
from MLlib.quark.layers import *
from MLlib.models import Sequential

x = np.arange(1, 1000).reshape(-1, 1)/1000
y = x*2 -3
m = Sequential()
m.add(FFL(1, 1, activation='linear'))
m.compile_model(lr=0.001, opt="sgd", loss="mse")
m.summary()
m.train(x, y, epochs=2000, show_every=100, batch_size=10)
# m.visualize()
# m.save_model()
# load_model()
print(m.predict(np.array([10]))) 

m.layers[0].weights, m.layers[0].biases

m.visualize()



StarcoderdataJupyterScriptsDedupFiltered