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

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
主站蜘蛛池模板: 平度市| 阜平县| 吴江市| 宾阳县| 华宁县| 汝城县| 蓬溪县| 玉环县| 浑源县| 托克逊县| 田东县| 昌平区| 南江县| 成安县| 广汉市| 泰来县| 邵阳县| 巍山| 内乡县| 湟源县| 历史| 邵武市| 武穴市| 云和县| 黔西县| 班玛县| 砚山县| 沽源县| 盱眙县| 武夷山市| 黔南| 汕头市| 蕲春县| 凤城市| 德昌县| 孟连| 弋阳县| 宾川县| 始兴县| 汪清县| 洛川县|