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

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
主站蜘蛛池模板: 浦县| 唐山市| 政和县| 贵南县| 古丈县| 高陵县| 石景山区| 奉化市| 大悟县| 宜宾市| 寿宁县| 和林格尔县| 湖南省| 江北区| 始兴县| 自贡市| 辉县市| 闵行区| 佛教| 镇康县| 宣威市| 开平市| 普定县| 根河市| 简阳市| 太原市| 石棉县| 萝北县| 疏附县| 修水县| 白银市| 闸北区| 长葛市| 永善县| 新河县| 岚皋县| 文山县| 达日县| 淮南市| 西昌市| 台前县|