Learn practical skills, build real-world projects, and advance your career
import numpy as np
import torch
import torch.nn as nn
#input(temp, rainfall, humidity)
inputs = np.array([[73,67,43],[91,88,64], [87,134,58],[102,42,37],[69,96,70]
                  ,[73,67,43],[91,88,64],[87,134,58],[102,42,37],[69,96,70],
                 [73,67,43],[91,88,64], [87,134,58],[102,42,37],[69,96,70]],
                 dtype ='float32')
#targets(apple,orange)
targets = np.array([[56,70], [81,101], [119,133],[22,37],[103,119],
                    [56,70], [81,101], [119,133],[22,37],[103,119],
                   [56,70], [81,101], [119,133],[22,37],[103,119]],
                  dtype ='float32')
inputs = torch.from_numpy(inputs)
targets = torch.from_numpy(targets)

That tensors are a generalization of matrices and are represented using n-dimensional arrays

**DATASET & DATALOADER **

TensorDataset : allows access to rows from inputs and targets as tuples, and provides standard APIs for working with many different types of datasets in PytTorch