官术网_书友最值得收藏!

Data preparation

PyTorch provides two kinds of data abstractions called tensors and variables. Tensors are similar to numpy arrays and they can also be used on GPUs, which provide increased performance. They provide easy methods of switching between GPUs and CPUs. For certain operations, we can notice a boost in performance and machine learning algorithms can understand different forms of data, only when represented as tensors of numbers. Tensors are like Python arrays and can change in size. For example, images can be represented as three-dimensional arrays (height, weight, channel (RGB)). It is common in deep learning to use tensors of sizes up to five dimensions. Some of the commonly used tensors are as follows:

  • Scalar (0-D tensors)
  • Vector (1-D tensors)
  • Matrix (2-D tensors)
  • 3-D tensors
  • Slicing tensors
  • 4-D tensors
  • 5-D tensors
  • Tensors on GPU
主站蜘蛛池模板: 巢湖市| 沧源| 淮阳县| 伊金霍洛旗| 平阴县| 沛县| 观塘区| 马关县| 进贤县| 元朗区| 宁都县| 乌兰县| 利津县| 墨竹工卡县| 沅江市| 平陆县| 社旗县| 湘西| 南靖县| 祥云县| 扶余县| 竹溪县| 民丰县| 锡林郭勒盟| 本溪| 濮阳市| 西峡县| 武隆县| 永福县| 江永县| 湘潭市| 梧州市| 孟州市| 集贤县| 教育| 陵水| 万盛区| 利川市| 洪泽县| 淳安县| 教育|