GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — update docs · netankit/DeepLearningTutorials@fc762a7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • code
    • logistic_sgd.py
  • doc
    • logreg.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/logistic_sgd.py‎

Copy file name to clipboardExpand all lines: code/logistic_sgd.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def sgd_optimization_mnist(learning_rate=0.13, n_epochs=1000,
441441

442442
def predict():
443443
"""
444-
An example of how to load a train model and use it
444+
An example of how to load a trained model and use it
445445
to predict labels.
446446
"""
447447

Collapse file

‎doc/logreg.txt‎

Copy file name to clipboardExpand all lines: doc/logreg.txt
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,20 @@ approximately 1.936 epochs/sec and it took 75 epochs to reach a test
264264
error of 7.489%. On the GPU the code does almost 10.0 epochs/sec. For this
265265
instance we used a batch size of 600.
266266

267+
268+
Prediction Using a Trained Model
269+
+++++++++++++++++++++++++++++++
270+
271+
``sgd_optimization_mnist`` serialize and pickle the model each time new
272+
lowest validation error is reached. We can reload this model and predict
273+
labels of new data. ``predict`` function shows an example of how
274+
this could be done.
275+
276+
.. literalinclude:: ../code/logistic_sgd.py
277+
:start-after: ' ran for %.1fs' % ((end_time - start_time)))
278+
:end-before: if __name__ == '__main__':
279+
280+
267281
.. rubric:: Footnotes
268282

269283
.. [#f1] For smaller datasets and simpler models, more sophisticated descent

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.