MCPcopy Create free account
hub / github.com/Raibows/MLinRust / one_step

Method one_step

src/model/linear_regression.rs:33–42  ·  view source on GitHub ↗

Forward, then calculate the loss, and update the weights. Finally return the average loss of this batch.

(&mut self, feature: &NdArray, label: &Vec<f32>, lr: f32, gradient_clip_by_norm: Option<NormType>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

test_with_synthetic_dataFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 3

forwardMethod · 0.45
backwardMethod · 0.45
stepMethod · 0.45

Tested by 1

test_with_synthetic_dataFunction · 0.36