Skip to content

cdelcos/CelsiusToFahrenheitPytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Simple PyTorch Linear Regression Example

This script demonstrates a basic linear regression using PyTorch to learn the relationship between temperature in Celsius and Fahrenheit.

  • Defines a single data point: 37.78°C = 100°F
  • Trains a simple linear model y = wx + b using gradient descent
  • Prints the learned parameters (weight and bias) every 100 iterations
  • Uses the trained model to predict the Fahrenheit equivalent of 37.78°C

Requirements

Only minimal dependencies are needed:

  • Python 3.12+
  • PyTorch

How to setup Conda environment

conda env create celsius-farenheit-pytorch -f environment.yml

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages