3337 views|0 replies

10

Posts

0

Resources
The OP
 

#AI Challenge Camp First Stop# Implementing MNIST handwritten digit recognition based on pytorch [Copy link]

This post was last edited by Hehe123 on 2024-4-16 10:14

Basic concepts :

1. The essence of model training is to learn the patterns and relationships between data through a large amount of data and algorithms, so that the model can make accurate predictions or decisions on new, unseen data. The final result of training is to obtain a trained model that can make accurate predictions and classifications on new input data.

2. PyTorch is an open source machine learning library based on Python and designed for deep neural networks. It provides powerful GPU acceleration support, dynamic graph mechanism and automatic differentiation function, making the model development, debugging and optimization process more efficient.

Supported operating systems: windows, macos, linux, etc.

Supported computing platforms: CPU, NVIDIA GPU, AMD GPU, TPU, etc.

Environment setup:

debian 12 + vscode + pytorch

pytorch installation: pip install torch torchvision torchaudio

Problem: Debian uses python3.11.X, which does not support pip installation

Solution: Use a virtual python environment, the command is as follows:

python3 -m venv myenv ------Create your own Python virtual environment, myenv is the name of your own virtual environment

source myenv/bin/active ------Activate the virtual environment

pip install XXX ------Install the required python library

deactive ------Close the virtual environment

Source code :

Download the test training set:

Define the training network:

Start training:

Test Methods:

Test Results

Trained model output:

model_0.pth

5.45 MB, downloads: 1

model_1.pth

5.45 MB, downloads: 0

model_2.pth

5.45 MB, downloads: 0

model_3.pth

5.45 MB, downloads: 0

model_4.pth

5.45 MB, downloads: 0

model_5.pth

5.45 MB, downloads: 0

model_6.pth

5.45 MB, downloads: 0

model_7.pth

5.45 MB, downloads: 0

model_8.pth

5.45 MB, downloads: 0

model_9.pth

5.45 MB, downloads: 0

This post is from Embedded System

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
About the use of HFSS software (reposted)

There are two key points in using HFSS software: applying excitation and setting boundaries, both of which are completed ...

Impedance Matching and the Smith Chart: Basic Principles

Impedance Matching and the Smith Chart: Basic Principles

Repair of a soldering station that short-circuits when powered on

This post was last edited by long521 on 2020-5-30 08:12 The factory has been quite busy recently, and there are sever ...

Regarding the derivation and simulation of the output voltage formula of the push-pull transformer, this is the first time I ask for help online. I hope to get help from you guys.

This is my first time doing push-pull. As shown in the figure, I asked my classmates about the derivation of the formula ...

One week evaluation information delivered on time~

Hello, everyone~ The weekly review information is here again~ This weekend is Qingming Festival, what are your plans? Be ...

【Development and application based on NUCLEO-F746ZG motor】11. Parameter configuration - ADC configuration

In the development of servo drive, ADC acquisition is the key point. The analog quantities in this development board a ...

MIL-STD-883K_CHG-1 Jul 2016

One of the MIL-STD series: MIL-STD-883K_CHG-1 Jul 2016

[2022 Digi-Key Innovation Design Competition] Distributed Temperature and Humidity Collection System - Schematic Diagram of the Collection End

1. Functional Overview With HLK-W800-KIT as the main WIFI core, the on-chip peripheral I2C bus of the onboard Liansheng ...

Is it possible to perform socket communication without IP and port number?

When using socket communication, whether it is internal communication within the local machine or communication betwee ...

C++ Cross-Platform Development Technical Guide

This book introduces the cross-platform technology of C++ language in detail, including the strategies and processes ado ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list