PT21-22-Reseau-Neurones/tests/flowerGardenLearningVisualization.py

18 lines
377 B
Python
Raw Permalink Normal View History

2022-02-17 16:14:21 +01:00
#!/bin/python3
from sys import path
path.insert(1, "..")
from sobek.network import network
import pickle
with open("flowerGardenData", "rb") as file:
data = pickle.load(file)
trainPoints = data[0]
trainLabels = data[1]
myNetwork = network(2, 16, 1)
2022-03-10 15:09:20 +01:00
learningRate = 3.0
2022-02-17 16:14:21 +01:00
2022-03-10 15:09:20 +01:00
myNetwork.train(trainPoints, trainLabels, learningRate, batchSize=100, epochs=3000, visualize=True)