• torch.cat
  • torch.from_numpy(ndarray)
  • torch.mm()
  • torch.unbind
  • torch.chunk

# create a class Stack

class Stack():
def __init__(self):
self.items = []

def push(self,item):
self.items.append(item)

def pop(self):
return self.items.pop()

def is_empty(self):
return self.items == []

def get_top(self):
if not self.is_empty():
return self.items[-1]


def get_stack(self):
return self.items





Issue

Google is tracking, logging your purchases.

Shaswat Singh

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store