Skip to content

Commit

Permalink
Update card
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliiznak committed Sep 17, 2024
1 parent 7461f6b commit d815c8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/LearningProcessVisualizer/LearningProcessVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ const LearningProcessVisualizer: Component = () => {
<p>Learning Rate: {data.learningRate}</p> */}
</div>
);
case 'iteration':
console.log("Rendering iteration step");
return {/* <div>Iteration {data.iteration} completed, Loss: {data.loss?.toFixed(4)}</div>; */}
default:
console.log("Unknown step:", currentPhase);
return null;
Expand Down
1 change: 1 addition & 0 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function updateWeights() {
const result = store.trainer.updateWeights(store.trainingConfig.learningRate);

setStore('trainingStepResult', result);
setStore('trainingState', 'weightUpdateResults', result); // Add this line
setStore('network', store.trainer.network);
setStore('trainingState', 'currentPhase', 'update');
});
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type AppState = {

// Training state
trainingState: {
currentPhase: 'idle',
currentPhase: 'idle'| 'forward'| 'loss' | 'backward' | 'update',
iteration: 0,
currentLoss: null,
forwardStepResults: [],
Expand All @@ -38,6 +38,8 @@ export type AppState = {
trainingRuns: TrainingRun[]; // Add this line
};

type TrainingRun = any

export type BackwardStepGradients = {
neuron: number;
weights: number;
Expand Down

0 comments on commit d815c8c

Please sign in to comment.