# TensorFlow

[](https://www.github.com/tensorflow) [TF released](https://www.github.com/tensorflow/tensorflow/releases) An end-to-end platform for machine learning [Install TensorFlow](https://www.tensorflow.org/install) ![](https://www.tensorflow.org/static/site-assets/images/marketing/learn/learn-hero.svg)

## Get started with TensorFlow

TensorFlow makes it easy to create ML models that can run in any environment.
Learn how to use the intuitive APIs through interactive code samples.
[View tutorials](https://www.tensorflow.org/tutorials)

```
import tensorflow as tf
mnist = tf.keras.datasets.mnist

(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dropout(0.2),
  tf.keras.layers.Dense(10, activation='softmax')
])

model.compile(optimizer='adam',
  loss='sparse_categorical_crossentropy',
  metrics=['accuracy'])

model.fit(x_train, y_train, epochs=5)
model.evaluate(x_test, y_test)
```
[Run quickstart](https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/quickstart/beginner.ipynb)

## Solve real-world problems with ML

Explore examples of how TensorFlow is used to advance research and build AI-powered applications.
<button aria-label="Watch now" class="tensorsite-card__href devsite-dialog-button" data-modal-dialog-id="video-modal--tF70o1Q8VkM"> </button> ![](https://www.tensorflow.org/static/site-assets/images/marketing/cards/webai-summit-2024.jpg) TENSORFLOW.JS
Catch up on the latest from the Web AI Summit
Explore the latest advancements in running models client-side with speakers from Chrome, MediaPipe, Intel, Hugging Face, Microsoft, LangChain, and more.
[Watch now](https://www.youtube.com/watch?v=tF70o1Q8VkM&list=PLNYkxOF6rcIAEVKJ98bDkQRkwvO4grhnt) <button class="devsite-dialog-close"> </button> [Video](https://www.youtube.com/watch?v=tF70o1Q8VkM) ![](https://www.tensorflow.org/static/site-assets/images/marketing/cards/tensorflow-gnn.png) TensorFlow GNN [Analyze relational data using graph neural networks](https://blog.tensorflow.org/2024/02/graph-neural-networks-in-tensorflow.html) GNNs can process complex relationships between objects, making them a powerful technique for traffic forecasting, medical discovery, and more.
[Learn about TF GNN](https://blog.tensorflow.org/2024/02/graph-neural-networks-in-tensorflow.html) ![](https://www.tensorflow.org/static/site-assets/images/marketing/cards/spotify-tensorflow-agents-recommendation-systems.png) ![](https://www.tensorflow.org/static/site-assets/images/marketing/cards/spotify-tensorflow-agents-recommendation-systems.gif) TensorFlow Agents [Build recommendation systems with reinforcement learning](https://blog.tensorflow.org/2023/10/simulated-spotify-listening-experiences-reinforcement-learning-tensorflow-tf-agents.html) Learn how Spotify uses the TensorFlow ecosystem to design an extendable offline simulator and train RL Agents to generate playlists.
[Read the blog](https://blog.tensorflow.org/2023/10/simulated-spotify-listening-experiences-reinforcement-learning-tensorflow-tf-agents.html)

## What's new in TensorFlow

Read the latest announcements from the TensorFlow team and community.

## Explore the ecosystem

Discover production-tested tools to accelerate modeling, deployment, and other workflows.
- [Library
  ### TensorFlow.js
  Train and run models directly in the browser using JavaScript or Node.js.](https://www.tensorflow.org/js)
- [Library
  ### LiteRT
  Deploy ML on mobile and edge devices such as Android, iOS, Raspberry Pi, and Edge TPU.](https://ai.google.dev/edge/litert)
- [API
  ### tf.data
  Preprocess data and create input pipelines for ML models.](https://www.tensorflow.org/guide/data)
- [Library
  ### TFX
  Create production ML pipelines and implement MLOps best practices.](https://www.tensorflow.org/tfx)
- [API
  ### tf.keras
  Create ML models with TensorFlow's high-level API.](https://www.tensorflow.org/guide/keras)
- [Resource
  ### Kaggle Models
  Find pre-trained models ready for fine-tuning and deployment.](https://www.kaggle.com/models)
- [Resource
  ### TensorFlow Datasets
  Browse the collection of standard datasets for initial training and validation.](https://www.tensorflow.org/datasets)
- [Tool
  ### TensorBoard
  Visualize and track development of ML models.](https://www.tensorflow.org/tensorboard)
[![](https://www.tensorflow.org/static/site-assets/images/marketing/home/model.svg)
### ML models \& datasets
Pretrained models and ready-to-use datasets for image, text, audio, and video use cases.](https://www.tensorflow.org/resources/models-datasets) [![](https://www.tensorflow.org/static/site-assets/images/marketing/home/research.svg)
### Libraries \& extensions
Packages for domain-specific applications and APIs for languages other than Python.](https://www.tensorflow.org/resources/libraries-extensions) [![](https://www.tensorflow.org/static/site-assets/images/marketing/home/robust.svg)
### Developer tools
Tools to evaluate models, optimize performance, and productionize ML workflows.](https://www.tensorflow.org/resources/tools) ![](https://www.tensorflow.org/static/site-assets/images/marketing/home/home-join-3.svg) Join the community Collaborate, find support, and share your projects by joining interest groups or attending developer events.
[Get involved](https://www.tensorflow.org/community) Learn ML New to machine learning? Begin with TensorFlow's curated curriculums or browse the resource library of books, online courses, and videos.
[Explore resources](https://www.tensorflow.org/resources/learn-ml) ![](https://www.tensorflow.org/static/site-assets/images/marketing/home/home-join-2.svg)

## Stay connected


Learn the latest in machine learning and TensorFlow by following our channels or signing up for the newsletter. View past newsletters in the [archive](https://www.tensorflow.org/subscribe/latest).
[![forum logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/forum-logo.svg)
Forum](https://discuss.tensorflow.org/) [![x logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/x-logo.svg)
X](https://twitter.com/tensorflow) [![youtube logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/youtube-logo.svg)
YouTube](https://www.youtube.com/tensorflow) [![linkedin logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/linkedin-logo.svg)
Linkedin](https://www.linkedin.com/showcase/tensorflowdev/) Country/Region\* Åland Islands (Åland) Albania (Shqipëria) Algeria (الجزائر) American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia (Հայաստանի Հանրապետութիւն) Aruba Ascension Island Australia Austria (Österreich) Azerbaijan (Azərbaycan) Bahamas Bahrain (البحرين) Bangladesh (বাংলাদেশ) Barbados Belgium (België) Belize Benin (Bénin) Bermuda Bhutan (भूटान) Bolivia Bosnia and Herzegovina (Bosna i Hercegovina) Botswana Bouvet Island Brazil (Brasil) British Indian Ocean Territory British Virgin Islands Brunei Bulgaria (България) Burkina Faso Burundi Cambodia (កម្ពុជា) Cameroon (Cameroun) Canada Canary Islands Cape Verde (Cabo Verde) Caribbean Netherlands Cayman Islands Central African Republic (République centrafricaine) Ceuta and Melilla Chad (تشاد) Chile China (中国) Christmas Island Clipperton Island Cocos (Keeling) Islands Colombia Comoros (جزر القمر) Congo (DRC) (République démocratique du Congo) Congo Cook Islands Costa Rica Croatia (Hrvatska) Curaçao Cyprus (Κύπρος) Czechia (Česko) Côte d'Ivoire Denmark (Danmark) Diego Garcia Djibouti (Jabuuti) Dominica Dominican Republic (República Dominicana) Ecuador Egypt (مصر) El Salvador Equatorial Guinea (Guinée équatoriale) Eritrea (ኤርትራ, اريتريا) Estonia (Eesti) Ethiopia (ኢትዮጵያ) Falkland Islands Faroe Islands (Føroyar) Fiji (फिजी) Finland (Suomi) France French Guiana (Guyane française) French Polynesia (Polynésie française) French Southern Territories Gabon Gambia Georgia (საქართველო) Germany (Deutschland) Ghana Gibraltar Greece (Ελλάδα) Greenland (Kalaallit Nunaat) Grenada Guadeloupe Guam Guatemala Guernsey Guinea (Guinée) Guinea-Bissau (Guiné Bissau) Guyana Haiti (Haïti) Heard \& McDonald Islands Honduras Hong Kong (香港) Hungary (Magyarország) Iceland (Ísland) India (भारत) Indonesia Iraq (العراق) Ireland Isle of Man Israel (ישראל) Italy (Italia) Jamaica Japan (日本) Jersey Jordan (الأردن) Kazakhstan (Казахстан) Kenya Kiribati Kosovo Kuwait (الكويت) Kyrgyzstan (Кыргызстан) Laos (ลาว) Latvia (Latvija) Lebanon (لبنان) Lesotho Liberia Libya (ليبيا) Liechtenstein Lithuania (Lietuva) Luxembourg Macau (澳門) Macedonia (FYROM) (Македонија) Madagascar Malawi Malaysia Maldives Mali (مالي) Malta Marshall Islands Martinique Mauritania (موريتانيا) Mauritius Mayotte Mexico (México) Micronesia Moldova Monaco Mongolia (Монгол улс) Montenegro (Црна Гора) Montserrat Morocco (المغرب) Mozambique (Moçambique) Myanmar (Burma) Namibia Nauru Nepal (नेपाल) Netherlands (Nederland) Netherlands Antilles (Nederlandse Antillen) New Caledonia (Nouvelle-Calédonie) New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway (Norge) Oman (عمان) Outlying Oceania Pakistan (پاکستان) Palau Palestine (فلسطين) Panama (Panamá) Papua New Guinea Paraguay Peru (Perú) Philippines Pitcairn Islands Poland (Polska) Portugal Puerto Rico Qatar (قطر) Romania (România) Rwanda Réunion Saint Barthélemy Saint Helena Saint Kitts and Nevis Saint Lucia Saint Martin Saint Pierre and Miquelon Samoa San Marino Saudi Arabia (المملكة العربية السعودية) Senegal (Sénégal) Serbia (Србија) Seychelles Sierra Leone Singapore (新加坡) Sint Maarten Slovakia (Slovenská republika) Slovenia (Slovenija) Solomon Islands Somalia (Somali) South Africa South Georgia \& South Sandwich Islands South Korea (대한민국) South Sudan Spain (España) Sri Lanka (இலங்கை) St. Vincent \& Grenadines Sudan (السودان) Suriname Svalbard and Jan Mayen Swaziland Sweden (Sverige) Switzerland (Schweiz, Suisse, Svizzera) São Tomé and Príncipe Taiwan (台灣) Tajikistan (تاجیکستان) Tanzania Thailand (ประเทศไทย) Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tristan da Cunha Tunisia (تونس) Turkey (Türkiye) Turkmenistan (Туркменистан) Turks and Caicos Islands Tuvalu U.S. Outlying Islands (United States Minor Outlying Islands) U.S. Virgin Islands Uganda Ukraine (Україна) United Arab Emirates (الامارات العربية المتحدة) United Kingdom United States Uruguay Uzbekistan (Ўзбекистон) Vanuatu Vatican City (Vaticano) Venezuela Vietnam (Việt Nam) Wallis and Futuna Western Sahara (الصحراء الغربية) Yemen (اليمن) Zambia Zimbabwe Reason for using TensorFlow\*

- App developer - you are using ML for mobile or web applications.
- Learner -- you are learning ML, or a student from another discipline exploring ML.
- ML provider - you are using ML to solve specific business problems.
- Researcher/data scientist - you are in academia or industry ML research, focusing on developing new ML methods, or applying, optimizing, scaling ML to solve business problems.
Communication preferences Monthly newsletter * info * Receive the latest news and product updates from the TensorFlow team and community. Research \& surveys * info * Receive invitations from the Google team to share your experiences and product feedback by participating in surveys.

*** ** * ** ***

*** ** * ** ***

Please complete the reCAPTCHA. <button class="tensorsite-arrow-button tensorsite-content__cta-icon tensorsite-icon--redesign-arrow--small subscribe-button" data-label="Submit" data-label-processing="Submitting..." type="submit"> Subscribe </button> Failed to submit, please try again. Thank you! You are now signed up for TensorFlow emails. [![forum logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/forum-logo.svg)
Forum](https://discuss.tensorflow.org/) [![x logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/x-logo.svg)
X](https://twitter.com/tensorflow) [![youtube logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/youtube-logo.svg)
YouTube](https://www.youtube.com/tensorflow) [![linkedin logo](https://www.tensorflow.org/static/site-assets/images/marketing/home/linkedin-logo.svg)
Linkedin](https://www.linkedin.com/showcase/tensorflowdev/)

## Start building with TensorFlow

[Install TensorFlow](https://www.tensorflow.org/install) [Explore tutorials](https://www.tensorflow.org/tutorials)