Code for the AI lab course 2021/2022 of the University of Verona

Related tags

Deep Learning AI-Lab
Overview

AI-Lab

Code for the AI lab course 2021/2022 of the University of Verona

Set-Up the environment for the curse

  1. Download Anaconda for your System.

  2. Install Anaconda

    • On Linux/Mac
      • Use sh Anacaonda{version}.sh to install.
      • Add it to the PATH during installation if you’re ok with it:
        • First export PATH=~/anaconda3/bin:$PATH
        • Then source ~/.bashrc
      • sudo apt-get install git (may be required).
    • On Windows
      • Double click the installer to launch.
      • NB: during the installation, ensure to install "Anaconda Prompt" and use it for the other steps.
  3. Set-Up conda environment:

Using the Notebook

To start the environment and work on your assignments, navigate to the downloaded folder root (AI-Lab) and run:

source ~/anaconda3/etc/profile.d/conda.sh (may be required on linux).
conda activate ai-lab
jupyter notebook

The last command will open your browser for you to start working. To open the tutorial navigate with your browser to the current lesson notebook (Lesson_*/lesson_*_problem.ipynb).

Authors

Acknowledgments

Environments are based on OpenAI Gym: https://github.com/openai/gym

You might also like...
CS506-Spring2022 - Code and Slides for Boston University CS 506

CS 506 - Computational Tools for Data Science Code, slides, and notes for Boston

All-in-one Docker container that allows a user to explore Nautobot in a lab environment.
All-in-one Docker container that allows a user to explore Nautobot in a lab environment.

Nautobot Lab This container is not for production use! Nautobot Lab is an all-in-one Docker container that allows a user to quickly get an instance of

A trusty face recognition research platform developed by Tencent Youtu Lab
A trusty face recognition research platform developed by Tencent Youtu Lab

Introduction TFace: A trusty face recognition research platform developed by Tencent Youtu Lab. It provides a high-performance distributed training fr

NHS AI Lab Skunkworks project: Long Stayer Risk Stratification
NHS AI Lab Skunkworks project: Long Stayer Risk Stratification

NHS AI Lab Skunkworks project: Long Stayer Risk Stratification A pilot project for the NHS AI Lab Skunkworks team, Long Stayer Risk Stratification use

piSTAR Lab is a modular platform built to make AI experimentation accessible and fun. (pistar.ai)
piSTAR Lab is a modular platform built to make AI experimentation accessible and fun. (pistar.ai)

piSTAR Lab WARNING: This is an early release. Overview piSTAR Lab is a modular deep reinforcement learning platform built to make AI experimentation a

Manipulation OpenAI Gym environments to simulate robots at the STARS lab

Manipulator Learning This repository contains a set of manipulation environments that are compatible with OpenAI Gym and simulated in pybullet. In par

Experiments for Operating Systems Lab (ETCS-352)

Operating Systems Lab (ETCS-352) Experiments for Operating Systems Lab (ETCS-352) performed by me in 2021 at uni. All codes are written by me except t

SAS output to EXCEL converter for Cornell/MIT Language and acquisition lab

CORNELLSASLAB SAS output to EXCEL converter for Cornell/MIT Language and acquisition lab Instructions: This python code can be used to convert SAS out

RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.
RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.

RITA: a Study on Scaling Up Generative Protein Sequence Models RITA is a family of autoregressive protein models, developed by a collaboration of Ligh

Comments
  • Node.__hash__() should return an integer

    Node.__hash__() should return an integer

    problem

    The method Node.__hash__() is now returning the node.state attribute that is not guaranteed to be a integer.

    The method sample of the environment returns a numpy.int64 object, in this way using the following code A TypeError will be raised with the following message: __hash__ method should return an integer.

    envname = "SmallMaze-v0"
    environment = gym.make(envname)
    
    a_queue_node = NodeQueue()
    
    # creating a list of nodes from the startstate
    for action in environment.actions:
        a_queue_node.add(Node(environment.sample(environment.startstate, action)))
    
    # error
    node = a_queue_node.remove()
    print(node in a_queue_node)
    

    workaround

    The stupidest workaround to solve the problem is to cast the sample value to int before the creation of the node

    envname = "SmallMaze-v0"
    environment = gym.make(envname)
    
    a_queue_node = NodeQueue()
    
    # creating a list of nodes from the startstate
    for action in environment.actions:
        a_queue_node.add(Node(int(environment.sample(environment.startstate, action))))
    
    # error
    node = a_queue_node.remove()
    print(node in a_queue_node)
    

    possible solutions

    I propose two possible solutions:

    1. Forcing the type of the Node.state attribute to be a integer in the Node.__init__() method:
    class Node:
        def __init__(self, state, parent=None, pathcost=0, value=0):
            self.state = int(state)
            self.pathcost = pathcost
            self.value = value
            self.parent = parent
            self.removed = False
    
        def __hash__(self):
            return self.state
    
        def __lt__(self, other):
            return self.value < other.value
    
    1. Forcing the type of the Node.state attribute to be convertible to an int when it's needed:
    class Node:
        def __init__(self, state, parent=None, pathcost=0, value=0):
            self.state = state
            self.pathcost = pathcost
            self.value = value
            self.parent = parent
            self.removed = False
    
        def __hash__(self):
            return int(self.state)
    
        def __lt__(self, other):
            return self.value < other.value
    
    opened by NoeMurr 1
Owner
Davide Corsi
Davide Corsi
School of Artificial Intelligence at the Nanjing University (NJU)School of Artificial Intelligence at the Nanjing University (NJU)

F-Principle This is an exercise problem of the digital signal processing (DSP) course at School of Artificial Intelligence at the Nanjing University (

Thyrix 5 Nov 23, 2022
Jittor Medical Segmentation Lib -- The assignment of Pattern Recognition course (2021 Spring) in Tsinghua University

THU模式识别2021春 -- Jittor 医学图像分割 模型列表 本仓库收录了课程作业中同学们采用jittor框架实现的如下模型: UNet SegNet DeepLab V2 DANet EANet HarDNet及其改动HarDNet_alter PSPNet OCNet OCRNet DL

null 48 Dec 26, 2022
Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2020

Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2020

Phillip Lippe 1.1k Jan 7, 2023
Final Project for the CS238: Decision Making Under Uncertainty course at Stanford University in Autumn '21.

Final Project for the CS238: Decision Making Under Uncertainty course at Stanford University in Autumn '21. We optimized wind turbine placement in a wind farm, subject to wake effects, using Q-learning.

Manasi Sharma 2 Sep 27, 2022
Imposter-detector-2022 - HackED 2022 Team 3IQ - 2022 Imposter Detector

HackED 2022 Team 3IQ - 2022 Imposter Detector By Aneeljyot Alagh, Curtis Kan, Jo

Joshua Ji 3 Aug 20, 2022
All course materials for the Zero to Mastery Deep Learning with TensorFlow course.

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.

Daniel Bourke 3.4k Jan 7, 2023
Train neural network for semantic segmentation (deep lab V3) with pytorch in less then 50 lines of code

Train neural network for semantic segmentation (deep lab V3) with pytorch in 50 lines of code Train net semantic segmentation net using Trans10K datas

null 17 Dec 19, 2022
[CVPR 2022] CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation

CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation Prerequisite Please create and activate the following conda envrionment. To r

Qin Wang 87 Jan 8, 2023
Final project code: Implementing MAE with downscaled encoders and datasets, for ESE546 FA21 at University of Pennsylvania

546 Final Project: Masked Autoencoder Haoran Tang, Qirui Wu 1. Training To train the network, please run mae_pretraining.py. Please modify folder path

Haoran Tang 0 Apr 22, 2022
Final project code: Implementing BicycleGAN, for CIS680 FA21 at University of Pennsylvania

680 Final Project: BicycleGAN Haoran Tang Instructions 1. Training To train the network, please run train.py. Change hyper-parameters and folder paths

Haoran Tang 0 Apr 22, 2022