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

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
主站蜘蛛池模板: 隆林| 白朗县| 罗源县| 普宁市| 平邑县| 青阳县| 恭城| 本溪市| 陇南市| 平顶山市| 徐闻县| 蓬莱市| 宜兰市| 内黄县| 吉木乃县| 兴山县| 黔南| 潢川县| 和政县| 斗六市| 临城县| 金坛市| 松溪县| 肇东市| 浑源县| 西华县| 老河口市| 易门县| 应城市| 安西县| 思南县| 韶山市| 博兴县| 阜城县| 山阳县| 晴隆县| 象山县| 边坝县| 克什克腾旗| 沽源县| 株洲县|