MCPcopy
hub / github.com/tensorflow/playground / oneStep

Function oneStep

src/playground.ts:909–923  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

907}
908
909function oneStep(): void {
910 iter++;
911 trainData.forEach((point, i) => {
912 let input = constructInput(point.x, point.y);
913 nn.forwardProp(network, input);
914 nn.backProp(network, point.label, nn.Errors.SQUARE);
915 if ((i + 1) % state.batchSize === 0) {
916 nn.updateWeights(network, state.learningRate, state.regularizationRate);
917 }
918 });
919 // Compute the loss.
920 lossTrain = getLoss(network, trainData);
921 lossTest = getLoss(network, testData);
922 updateUI();
923}
924
925export function getOutputWeights(network: nn.Node[][]): number[] {
926 let weights: number[] = [];

Callers 2

startMethod · 0.85
makeGUIFunction · 0.85

Calls 3

constructInputFunction · 0.85
getLossFunction · 0.85
updateUIFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…