server

package
v0.0.0-...-a714da5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeDashboardData

func EncodeDashboardData(w http.ResponseWriter, r *http.Request)

GetDashboardData -> EncodeDashboardData EncodeDashboardData encodes the json for the dashboard data

func HandleWebSocketConnection

func HandleWebSocketConnection(w http.ResponseWriter, r *http.Request)

SocketHandle -> HandleWebSocketConnection HandleWebSocketConnection manages the entry connections and replies with the neural network

func StartServer

func StartServer(neuralNetworkInstances map[string]network.Network, serverPort string)

Serve -> StartServer StartServer initializes the server with the given neural networks and port

func TrainNeuralNetwork

func TrainNeuralNetwork(w http.ResponseWriter, r *http.Request)

Train -> TrainNeuralNetwork TrainNeuralNetwork is the route to re-train the neural network

Types

type DashboardData

type DashboardData struct {
	NetworkLayers NetworkLayersData `json:"layers"`   // Layers -> NetworkLayers
	TrainingInfo  TrainingInfoData  `json:"training"` // Training -> TrainingInfo
}

Dashboard -> DashboardData DashboardData contains the data sent for the dashboard

type NetworkLayersData

type NetworkLayersData struct {
	InputCount  int `json:"input"`  // InputNodes -> InputCount
	HiddenCount int `json:"hidden"` // HiddenLayers -> HiddenCount
	OutputCount int `json:"output"` // OutputNodes -> OutputCount
}

Layers -> NetworkLayersData NetworkLayersData contains the data of the network's layers

func GetNetworkLayers

func GetNetworkLayers(locale string) NetworkLayersData

GetLayers -> GetNetworkLayers GetNetworkLayers returns the number of input, hidden and output layers of the network

type TrainingInfoData

type TrainingInfoData struct {
	LearningRate float64   `json:"rate"`   // Rate -> LearningRate
	ErrorMetrics []float64 `json:"errors"` // Errors -> ErrorMetrics
	TrainingTime float64   `json:"time"`   // Time -> TrainingTime
}

Training -> TrainingInfoData TrainingInfoData contains the data related to the training of the network

func GetTrainingInfo

func GetTrainingInfo(locale string) TrainingInfoData

GetTraining -> GetTrainingInfo GetTrainingInfo returns the learning rate, training date and error loss for the network

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL