当前位置:网站首页>Tensorflow daily essay (I)
Tensorflow daily essay (I)
2022-06-24 05:54:00 【XianxinMao】
TensorFlow is an end-to-end open source platform for machine learning
TensorFlow makes it easy for beginners and experts to create machine learning models. See the sections below to get started.
https://www.tensorflow.org/tutorials
Tutorials show you how to use TensorFlow with complete, end-to-end examples
https://www.tensorflow.org/guide
Guides explain the concepts and components of TensorFlow.
For beginners
The best place to start is with the user-friendly Sequential API. You can create models by plugging together building blocks. Run the “Hello World” example below, then visit the tutorials to learn more.
To learn ML, check out our education page. Begin with curated curriculums to improve your skills in foundational ML areas.
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)For experts
class MyModel(tf.keras.Model):
def __init__(self):
super(MyModel, self).__init__()
self.conv1 = Conv2D(32, 3, activation='relu')
self.flatten = Flatten()
self.d1 = Dense(128, activation='relu')
self.d2 = Dense(10, activation='softmax')
def call(self, x):
x = self.conv1(x)
x = self.flatten(x)
x = self.d1(x)
return self.d2(x)
model = MyModel()
with tf.GradientTape() as tape:
logits = model(images)
loss_value = loss(logits, labels)
grads = tape.gradient(loss_value, model.trainable_variables)
optimizer.apply_gradients(zip(grads, model.trainable_variables))Learn about the relationship between TensorFlow and Keras
TensorFlow's high-level APIs are based on the Keras API standard for defining and training neural networks. Keras enables fast prototyping, state-of-the-art research, and production—all with user-friendly APIs.
Solutions to common problems
Explore step-by-step tutorials to help you with your projects.
https://www.tensorflow.org/tutorials/keras/classification
https://www.tensorflow.org/tutorials/generative/dcgan
https://www.tensorflow.org/tutorials/text/nmt_with_attention
News & announcements
Check out our blog for additional updates, and subscribe to our monthly TensorFlow newsletter to get the latest announcements sent directly to your inbox.
边栏推荐
- How to do reverse domain name resolution? What does reverse domain name resolution mean?
- Havip+keepalived high availability building
- Script updates CLB type ingress Certificate in tke cluster
- Typora software installation
- Oceanus practice - develop MySQL CDC to es SQL jobs from 0 to 1
- Establishment and basic use of vsftp server
- What is the website domain name and how to register the secondary domain name?
- [JS reverse hundred examples] Dangle login interface parameters reverse
- Install and use juicefs storage on Tencent cloud
- How enterprises overcome the data security barrier with the imminent implementation of the new law | interview with think tank on industrial security concept
猜你喜欢
随机推荐
His secret script of hard technology investment
How to record the purchased domain name? Why should the purchased domain name be filed?
Flutter - date of birth calculation age tool class
What is a website domain name and why do you want to register a domain name
Experience sharing on unified management and construction of virtual machine
Flutter layout Basics - page navigation and return
When we talk about zero trust, what are we talking about?
What domain name is good? How to choose a good domain name?
How does the company domain name come from? What kind of domain name is a good domain name
How to file a personal domain name? What are the benefits of domain name filing?
The website cannot be opened after windows installs the dongle
How enterprises overcome the data security barrier with the imminent implementation of the new law | interview with think tank on industrial security concept
How to apply for web domain name what is the role of domain name
What are the advantages of building a private cloud platform?
Detailed explanation of IPv6 theory and concept
How about the work domain name? Does the work domain name need real name authentication?
How to do domain name resolution? What does domain name resolution mean?
Risc-v assembly language programming (2) assembly program ASM_ run_ led
How do users check the domain name registrar? What are the conditions for domain name registration?
How to apply for a website domain name and what problems should be paid attention to