Hi All,
Can someone please help me with the below error.
Python is 2.7 and I am using pytorch in colab.
I am getting below error.
NameError: global name ‘self’ is not defined
The code is bit long so I have given Github link.

  
      github.com
  
  
    subhobrata/deep-learning-for-visual-computing/blob/master/Lecture_19.ipynb 4
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "Lecture 19.ipynb",
      "version": "0.3.2",
      "provenance": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python2",
      "display_name": "Python 2"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {


  This file has been truncated. show original

  
  
    
    
  
  


Thanks and Regards,
Subho