In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the example analysis of TensorFlow artificial intelligence learning creation data. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Data creation 1.tf.constant ()
Create custom types, custom shape data, but cannot create uninterpretable data like the following In [59].
2.tf.convert_to_tensor ()
Data of numpy and List types can be converted directly to tensor
3.tf.zeros ()
As usual, pass in a shape that contains parentheses.
Tf.zeros_like has the same function as pytorch. If you pass in data with a certain shape, you will generate the same zeros data as that shape. Tf.ones tf.ones_like is exactly what you thought.
4.tf.fill ()
Generate data of the specified shape, all contents are the same, the front shape, the latter parameter is the filled content.
2. Data random initialization of ① tf.random.normal ()
Normal distribution, incoming shape, mean variance can be specified.
② tf.random.truncated_normal ()
After tailoring the data, cut out the data with too little distribution before and after, and only take the data from the place where there is more intermediate data, the mean variance can also be specified.
③ tf.random.uniform ()
Uniformly distributed initialization, shape, minimum, maximum
④ tf.random.shuffle ()
Random scatter, can break an index order, through the tf.gather to correspond, so that you can achieve the same number of rows of data, index one-to-one corresponding random scatter.
This is the end of this article on "sample Analysis of TensorFlow artificial Intelligence Learning creation data". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.