ECE 329 Lecture 14 PyTorch DatasetsObject and Class in Phyton:•Class:Class is a set or category of things having some property or attribute incommon and differentiated from others by kind, type, or quality.•Object:object is one of instances of the class. which can perform the functionalitieswhich are defined in the class.•self:self represents the instance of the class. By using theselfkeyword we canaccess theattributesandmethodsof the class in python.•init:"init" is a reseved method in python classes. It is known as a constructor inobject oriented concepts. This method called when an object is created from theclass and it allow the class to initialize the attributes of a class.•Object and Class in PhytonclassRobot:def__init__(self, name, color, weight):self.name=nameself.color=colorself.weight=weightdefintroduce_self(self):print("My name is "+self.name)# this in Java# r1 = Robot()# r1.name = "Tom"# r1.color = "red"# r1.weight = 30# r2 = Robot()# r2.name = "Jerry"# r2.color = "blue"# r2.weight = 40r1=Robot("Tom","red",30)r2=Robot("Jerry","blue",40)r1.introduce_self()r2.introduce_self()Datasets•If you are working on a real-time project involving Deep Learning, it's common thatmost of your time goes into handling data, rather than the neural network that youwould build. This is because data is like fuel for your network: the more appropriateit is, the faster and the more accurate the results are! One of the main reasons foryour neural network to underperform might be due to bad, or poorly understood