Session #4
- Tensor Attributes
- Inputs / Outputs represented by tensors
- Scalar, Vector, Matrix (Used in maths)
- Number (Zero Index), Array (One Index), 2D-Array (Two Index)
- Tensors are multi-dimensional arrays
- Tensor Attributes, Rank, Axes, Shape
- Rank - Refers to the number of dimensions present in tensor, How many indices required to access an element
- Shape - Length of each axes, Shape allows visualizing tensor
- Image Input - to CNN as tensor
- Axes from Right to left
- [? A0,? A1,? A2,? A3]
- Height / Width on last axes
- [?,?,H,W]
- Color Channels
- [?,C,H,W]
- Three Indexes for Color Channel
- First Axes - Batch Size (Batches of samples)
- [3,1,28,80
- Batch of 3 images
- Single Color Channel
- Height, Width 28,28
- Three channel output for three layers
- Data to Tensors
- torch.tensor class
- Top level torch package
- Tensors contain data of uniform type
- Computation depend on type and device
- Computation has to be with same datatypes and same devices
- matching CPU and GPU versions
Happy Mastering DL!!!
No comments:
Post a Comment