Solved!
def emotion_check(image):

  dataloader = transforms.Compose([transforms.ToTensor(),

                               transforms.RandomHorizontalFlip(),

                               transforms.Resize((100, 100)),

                               transforms.Normalize((0.5,0.5,0.5), (0.5,0.5,0.5))])

  """load image, returns cuda tensor"""

  # image = Image.open(image_name)

  image = dataloader(image).float()

  image = Variable(image, requires_grad=True)

  image = image.unsqueeze(0)  

  return image.cuda()  

def expression(image):

  image = emotion_check(image)

  labeled_face = model_resnet34(image)

  _, prediction = torch.max(labeled_face, 1)

  return class_names[prediction]