chore: import upstream snapshot with attribution
@@ -0,0 +1,25 @@
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3
|
||||
|
||||
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
||||
ARG NODE_VERSION="none"
|
||||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
||||
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install libgl1
|
||||
|
||||
# Copy requirements.txt to a temp location for package installation
|
||||
COPY .devcontainer/requirements.txt /tmp/conda-tmp/
|
||||
# Install packages using conda and pip directly to avoid hanging on environment solving
|
||||
RUN umask 0002 \
|
||||
&& /opt/conda/bin/conda install -y -c conda-forge -c pytorch -c defaults \
|
||||
python pip ipykernel ipython ipywidgets jupyter matplotlib=3.9 numpy=1.26 \
|
||||
requests=2.32 scikit-learn scipy=1.13 opencv setuptools \
|
||||
pytorch torchtext torchvision torchdata \
|
||||
&& /opt/conda/bin/pip install --no-cache-dir -r /tmp/conda-tmp/requirements.txt \
|
||||
&& rm -rf /tmp/conda-tmp
|
||||
|
||||
# [Optional] Uncomment to install a different version of Python than the default
|
||||
# RUN conda install -y python=3.6 \
|
||||
# && pip install --no-cache-dir pipx \
|
||||
# && pipx reinstall-all
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Display a notice when not running in GitHub Codespaces
|
||||
|
||||
cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt
|
||||
When using "conda" from outside of GitHub Codespaces, note the Anaconda repository
|
||||
contains restrictions on commercial use that may impact certain organizations. See
|
||||
https://aka.ms/vscode-remote/conda/miniconda
|
||||
|
||||
EOF
|
||||
|
||||
notice_script="$(cat << 'EOF'
|
||||
if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
|
||||
cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt"
|
||||
mkdir -p "$HOME/.config/vscode-dev-containers"
|
||||
((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &)
|
||||
fi
|
||||
EOF
|
||||
)"
|
||||
|
||||
echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "Miniconda (Python 3)",
|
||||
"image": "mcr.microsoft.com/devcontainers/miniconda",
|
||||
"hostRequirements": {
|
||||
"cpus": 2
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "/opt/conda/bin/python",
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
|
||||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
||||
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
|
||||
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
|
||||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
|
||||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
||||
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
|
||||
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
|
||||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
|
||||
},
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance"
|
||||
]
|
||||
}
|
||||
},
|
||||
"forwardPorts": [],
|
||||
"postCreateCommand": "conda update conda -y && conda env create -f environment.yml",
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
name: ai4beg
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- ipykernel
|
||||
- ipython
|
||||
- ipywidgets
|
||||
- jupyter
|
||||
- matplotlib=3.9
|
||||
- numpy=1.26
|
||||
- python
|
||||
- requests=2.32
|
||||
- scikit-learn
|
||||
- scipy=1.13
|
||||
- pip
|
||||
- conda-forge::opencv
|
||||
- setuptools
|
||||
- pytorch::pytorch
|
||||
- pytorch::torchtext
|
||||
- pytorch::torchvision
|
||||
- pytorch::torchdata
|
||||
- pip:
|
||||
- -r requirements.txt
|
||||
@@ -0,0 +1,21 @@
|
||||
gensim==4.3.3
|
||||
gym==0.26.2
|
||||
huggingface==0.0.1
|
||||
imageio==2.35.0
|
||||
keras==3.13.2
|
||||
nltk==3.9.4
|
||||
pandas==2.2.2
|
||||
pillow==12.2.0
|
||||
pygame==2.6.0
|
||||
scikit-image==0.24.0
|
||||
seaborn==0.13.2
|
||||
smart-open==7.0.4
|
||||
tensorboard-data-server==0.7.2
|
||||
tensorflow-datasets==4.9.6
|
||||
tensorflow-hub==0.16.1
|
||||
tensorflow==2.17.0
|
||||
tensorboard==2.17.1
|
||||
tokenizers==0.20.0
|
||||
torchinfo==1.8.0
|
||||
tqdm==4.66.5
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
name: "✍️ Lesson Correction / Typo"
|
||||
description: "Suggest corrections to spelling, broken links, or code errors in a lesson notebook"
|
||||
title: "[Correction]: "
|
||||
labels: ["bug", "documentation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for helping us improve our lessons! Please fill out the form below.
|
||||
- type: input
|
||||
id: lesson_name
|
||||
attributes:
|
||||
label: "Lesson Name or File Path"
|
||||
description: "Which week, lesson, or notebook file path contains the error?"
|
||||
placeholder: "e.g., lessons/3-NeuralNetworks/03-Perceptron/README.md"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: error_details
|
||||
attributes:
|
||||
label: "Correction Details"
|
||||
description: "Describe what is incorrect and what the correct spelling or code should be."
|
||||
placeholder: "The link to the PyTorch docs in section 3 is broken, it should point to..."
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,74 @@
|
||||
name: "🌐 Translation Feedback"
|
||||
description: "Suggest improvements or submit translations for a language"
|
||||
title: "[Translation]: "
|
||||
labels: ["translations"]
|
||||
body:
|
||||
- type: dropdown
|
||||
id: language
|
||||
attributes:
|
||||
label: "Target Language"
|
||||
options:
|
||||
- Arabic (ar)
|
||||
- Bengali (bn)
|
||||
- Bulgarian (bg)
|
||||
- Croatian (hr)
|
||||
- Czech (cs)
|
||||
- Danish (da)
|
||||
- Dutch (nl)
|
||||
- Estonian (et)
|
||||
- Finnish (fi)
|
||||
- French (fr)
|
||||
- German (de)
|
||||
- Greek (el)
|
||||
- Hebrew (he)
|
||||
- Hindi (hi)
|
||||
- Hungarian (hu)
|
||||
- Indonesian (id)
|
||||
- Italian (it)
|
||||
- Japanese (ja)
|
||||
- Kannada (kn)
|
||||
- Khmer (km)
|
||||
- Korean (ko)
|
||||
- Lithuanian (lt)
|
||||
- Malay (ms)
|
||||
- Malayalam (ml)
|
||||
- Marathi (mr)
|
||||
- Burmese (my)
|
||||
- Nepali (ne)
|
||||
- Nigerian Pidgin (pcm)
|
||||
- Norwegian (no)
|
||||
- Persian (fa)
|
||||
- Polish (pl)
|
||||
- Portuguese - Brazil (pt-BR)
|
||||
- Portuguese - Portugal (pt-PT)
|
||||
- Punjabi (pa)
|
||||
- Romanian (ro)
|
||||
- Russian (ru)
|
||||
- Serbian (sr)
|
||||
- Slovak (sk)
|
||||
- Slovenian (sl)
|
||||
- Spanish (es)
|
||||
- Swahili (sw)
|
||||
- Swedish (sv)
|
||||
- Tamil (ta)
|
||||
- Telugu (te)
|
||||
- Thai (th)
|
||||
- Tagalog (tl)
|
||||
- Turkish (tr)
|
||||
- Ukrainian (uk)
|
||||
- Urdu (ur)
|
||||
- Vietnamese (vi)
|
||||
- Simplified Chinese (zh-CN)
|
||||
- Traditional Chinese - Hong Kong (zh-HK)
|
||||
- Traditional Chinese - Macao (zh-MO)
|
||||
- Traditional Chinese - Taiwan (zh-TW)
|
||||
- Other (please specify in details)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: details
|
||||
attributes:
|
||||
label: "Details"
|
||||
description: "Specify the translation feedback, grammatical fixes, or new translation files you plan to submit."
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,102 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '37 17 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -0,0 +1,73 @@
|
||||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '44 15 * * 5'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecard on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard (optional).
|
||||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -0,0 +1,370 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# virtual environment
|
||||
.env
|
||||
.venv
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# ignore all pdf creation files
|
||||
package.json
|
||||
package-lock.json
|
||||
docsifytopdf.js
|
||||
docs/_sidebar.md
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
.ipynb_checkpoints/
|
||||
.vector_cache/
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Visual Studio Code cache/options directory
|
||||
.vscode/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Mac-specific
|
||||
.DS_Store
|
||||
@@ -0,0 +1,312 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project Overview
|
||||
|
||||
AI for Beginners is a comprehensive 12-week, 24-lesson curriculum covering Artificial Intelligence fundamentals. This educational repository includes practical lessons using Jupyter Notebooks, quizzes, and hands-on labs. The curriculum covers:
|
||||
|
||||
- Symbolic AI with Knowledge Representation and Expert Systems
|
||||
- Neural Networks and Deep Learning with TensorFlow and PyTorch
|
||||
- Computer Vision techniques and architectures
|
||||
- Natural Language Processing (NLP) including transformers and BERT
|
||||
- Specialized topics: Genetic Algorithms, Reinforcement Learning, Multi-Agent Systems
|
||||
- AI Ethics and Responsible AI principles
|
||||
|
||||
**Key Technologies:** Python 3, Jupyter Notebooks, TensorFlow, PyTorch, Keras, OpenCV, Vue.js (for quiz app)
|
||||
|
||||
**Architecture:** Educational content repository with Jupyter Notebooks organized by topic areas, supplemented by a Vue.js-based quiz application and extensive multi-language support.
|
||||
|
||||
## Setup Commands
|
||||
|
||||
### Primary Development Environment (Python/Jupyter)
|
||||
|
||||
The curriculum is designed to run with Python and Jupyter Notebooks. The recommended approach is using miniconda:
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/microsoft/ai-for-beginners
|
||||
cd ai-for-beginners
|
||||
|
||||
# Create and activate conda environment
|
||||
conda env create --name ai4beg --file environment.yml
|
||||
conda activate ai4beg
|
||||
|
||||
# Start Jupyter Notebook
|
||||
jupyter notebook
|
||||
# OR
|
||||
jupyter lab
|
||||
```
|
||||
|
||||
### Alternative: Using devcontainer
|
||||
|
||||
```bash
|
||||
# Open in VS Code and select "Reopen in Container" when prompted
|
||||
# The devcontainer will automatically set up the environment
|
||||
```
|
||||
|
||||
### Quiz Application Setup
|
||||
|
||||
The quiz app is a separate Vue.js application located in `etc/quiz-app/`:
|
||||
|
||||
```bash
|
||||
cd etc/quiz-app
|
||||
npm install
|
||||
npm run serve # Development server
|
||||
npm run build # Production build
|
||||
npm run lint # Lint and fix files
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Working with Jupyter Notebooks
|
||||
|
||||
1. **Local Development:**
|
||||
- Activate conda environment: `conda activate ai4beg`
|
||||
- Start Jupyter: `jupyter notebook` or `jupyter lab`
|
||||
- Navigate to lesson folders and open `.ipynb` files
|
||||
- Run cells interactively to follow lessons
|
||||
|
||||
2. **VS Code with Python Extension:**
|
||||
- Open repository in VS Code
|
||||
- Install Python extension
|
||||
- VS Code automatically detects and uses the conda environment
|
||||
- Open `.ipynb` files directly in VS Code
|
||||
|
||||
3. **Cloud Development:**
|
||||
- **GitHub Codespaces:** Click "Code" → "Codespaces" → "Create codespace on main"
|
||||
- **Binder:** Use the Binder badge on README to launch in browser
|
||||
- Note: Binder has limited resources and some web access restrictions
|
||||
|
||||
### GPU Support for Advanced Lessons
|
||||
|
||||
Later lessons benefit significantly from GPU acceleration:
|
||||
|
||||
- **Azure Data Science VM:** Use NC-series VMs with GPU support
|
||||
- **Azure Machine Learning:** Use notebook features with GPU compute
|
||||
- **Google Colab:** Upload notebooks individually (has free GPU support)
|
||||
|
||||
### Quiz App Development
|
||||
|
||||
```bash
|
||||
cd etc/quiz-app
|
||||
npm run serve # Hot-reload development server at http://localhost:8080
|
||||
```
|
||||
|
||||
## Testing Instructions
|
||||
|
||||
This is an educational repository focused on learning content rather than software testing. There is no traditional test suite.
|
||||
|
||||
### Validation Approaches:
|
||||
|
||||
1. **Jupyter Notebooks:** Execute cells sequentially to verify code examples work
|
||||
2. **Quiz App Testing:** Manual testing via development server
|
||||
3. **Translation Validation:** Check translated content in `translations/` folder
|
||||
4. **Quiz App Linting:** `npm run lint` in `etc/quiz-app/`
|
||||
|
||||
### Running Code Examples:
|
||||
|
||||
```bash
|
||||
# Activate environment first
|
||||
conda activate ai4beg
|
||||
|
||||
# Run Python scripts directly
|
||||
python lessons/4-ComputerVision/07-ConvNets/pytorchcv.py
|
||||
|
||||
# Or execute notebooks
|
||||
jupyter notebook lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
### Python Code Style
|
||||
|
||||
- Standard Python conventions for educational code
|
||||
- Clear, readable code prioritizing learning over optimization
|
||||
- Comments explaining key concepts
|
||||
- Jupyter Notebook-friendly: cells should be self-contained where possible
|
||||
- No strict linting requirements for lesson content
|
||||
|
||||
### JavaScript/Vue.js (Quiz App)
|
||||
|
||||
- ESLint configuration in `etc/quiz-app/package.json`
|
||||
- Run `npm run lint` to check and auto-fix issues
|
||||
- Vue 2.x conventions
|
||||
- Component-based architecture
|
||||
|
||||
### File Organization
|
||||
|
||||
```
|
||||
lessons/
|
||||
├── 0-course-setup/ # Setup instructions
|
||||
├── 1-Intro/ # Introduction to AI
|
||||
├── 2-Symbolic/ # Symbolic AI
|
||||
├── 3-NeuralNetworks/ # Neural Networks basics
|
||||
├── 4-ComputerVision/ # Computer Vision
|
||||
├── 5-NLP/ # Natural Language Processing
|
||||
├── 6-Other/ # Other AI techniques
|
||||
├── 7-Ethics/ # AI Ethics
|
||||
└── X-Extras/ # Additional content
|
||||
|
||||
etc/
|
||||
├── quiz-app/ # Vue.js quiz application
|
||||
└── quiz-src/ # Quiz source files
|
||||
|
||||
translations/ # Multi-language translations
|
||||
```
|
||||
|
||||
## Build and Deployment
|
||||
|
||||
### Jupyter Content
|
||||
|
||||
No build process required - Jupyter Notebooks are executed directly.
|
||||
|
||||
### Quiz Application
|
||||
|
||||
```bash
|
||||
cd etc/quiz-app
|
||||
|
||||
# Development
|
||||
npm run serve
|
||||
|
||||
# Production build
|
||||
npm run build # Outputs to etc/quiz-app/dist/
|
||||
|
||||
# Deploy to Azure Static Web Apps
|
||||
# Azure automatically creates GitHub Actions workflow
|
||||
# See etc/quiz-app/README.md for detailed deployment instructions
|
||||
```
|
||||
|
||||
### Documentation Site
|
||||
|
||||
The repository uses Docsify for documentation:
|
||||
- `index.html` serves as entry point
|
||||
- No build required - served directly via GitHub Pages
|
||||
- Access at: https://microsoft.github.io/AI-For-Beginners/
|
||||
|
||||
## Contributing Guidelines
|
||||
|
||||
### Pull Request Process
|
||||
|
||||
1. **Title Format:** Clear, descriptive titles describing the change
|
||||
2. **CLA Requirement:** Microsoft CLA must be signed (automated check)
|
||||
3. **Content Guidelines:**
|
||||
- Maintain educational focus and beginner-friendly approach
|
||||
- Test all code examples in notebooks
|
||||
- Ensure notebooks run end-to-end
|
||||
- Update translations if modifying English content
|
||||
4. **Quiz App Changes:** Run `npm run lint` before committing
|
||||
|
||||
### Translation Contributions
|
||||
|
||||
- Translations are automated via GitHub Actions using co-op-translator
|
||||
- Manual translations go in `translations/<language-code>/`
|
||||
- Quiz translations in `etc/quiz-app/src/assets/translations/`
|
||||
- Supported languages: 40+ languages (see README for full list)
|
||||
|
||||
### Active Contribution Areas
|
||||
|
||||
See `etc/CONTRIBUTING.md` for current needs:
|
||||
- Deep Reinforcement Learning sections
|
||||
- Object Detection improvements
|
||||
- Named Entity Recognition examples
|
||||
- Custom embedding training samples
|
||||
|
||||
## Environment Configuration
|
||||
|
||||
### Required Dependencies
|
||||
|
||||
```bash
|
||||
# Core Python packages (from requirements.txt)
|
||||
tensorflow==2.17.0
|
||||
torch (via conda)
|
||||
torchvision (via conda)
|
||||
keras==3.5.0
|
||||
opencv (via conda)
|
||||
scikit-learn
|
||||
numpy==1.26
|
||||
pandas==2.2.2
|
||||
matplotlib==3.9
|
||||
jupyter
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
No special environment variables required for basic usage.
|
||||
|
||||
For Azure deployments (quiz app):
|
||||
- `AZURE_STATIC_WEB_APPS_API_TOKEN` (set automatically by Azure)
|
||||
|
||||
## Debugging and Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
**Issue:** Conda environment creation fails
|
||||
- **Solution:** Update conda first: `conda update conda -y`
|
||||
- Ensure sufficient disk space (50GB recommended)
|
||||
|
||||
**Issue:** Jupyter kernel not found
|
||||
- **Solution:**
|
||||
```bash
|
||||
conda activate ai4beg
|
||||
python -m ipykernel install --user --name ai4beg
|
||||
```
|
||||
|
||||
**Issue:** GPU not detected in notebooks
|
||||
- **Solution:**
|
||||
- Verify CUDA installation: `nvidia-smi`
|
||||
- Check PyTorch GPU: `python -c "import torch; print(torch.cuda.is_available())"`
|
||||
- Check TensorFlow GPU: `python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"`
|
||||
|
||||
**Issue:** Quiz app won't start
|
||||
- **Solution:**
|
||||
```bash
|
||||
cd etc/quiz-app
|
||||
rm -rf node_modules package-lock.json
|
||||
npm install
|
||||
npm run serve
|
||||
```
|
||||
|
||||
**Issue:** Binder times out or blocks downloads
|
||||
- **Solution:** Use GitHub Codespaces or local setup for better resource access
|
||||
|
||||
### Memory Issues
|
||||
|
||||
Some lessons require significant RAM (8GB+ recommended):
|
||||
- Use cloud VMs for resource-intensive lessons
|
||||
- Close other applications when training models
|
||||
- Reduce batch sizes in notebooks if running out of memory
|
||||
|
||||
## Additional Notes
|
||||
|
||||
### For Course Instructors
|
||||
|
||||
- See `lessons/0-course-setup/for-teachers.md` for teaching guidance
|
||||
- Lessons are self-contained and can be taught in sequence or selected individually
|
||||
- Estimated time: 12 weeks at 2 lessons per week
|
||||
|
||||
### Cloud Resources
|
||||
|
||||
- **Azure for Students:** Free credits available for students
|
||||
- **Microsoft Learn:** Supplementary learning paths linked throughout
|
||||
- **Binder:** Free but limited resources and some network restrictions
|
||||
|
||||
### Code Execution Options
|
||||
|
||||
1. **Local (Recommended):** Full control, best performance, GPU support
|
||||
2. **GitHub Codespaces:** Cloud-based VS Code, good for quick access
|
||||
3. **Binder:** Browser-based Jupyter, free but limited
|
||||
4. **Azure ML Notebooks:** Enterprise option with GPU support
|
||||
5. **Google Colab:** Upload notebooks individually, free GPU tier available
|
||||
|
||||
### Working with Notebooks
|
||||
|
||||
- Notebooks are designed to be run cell-by-cell for learning
|
||||
- Many notebooks download datasets on first run (may take time)
|
||||
- Some models require GPU for reasonable training times
|
||||
- Pre-trained models are used where possible to reduce compute requirements
|
||||
|
||||
### Performance Considerations
|
||||
|
||||
- Later computer vision lessons (CNNs, GANs) benefit from GPU
|
||||
- NLP transformer lessons may require significant RAM
|
||||
- Training from scratch is educational but time-consuming
|
||||
- Transfer learning examples minimize training time
|
||||
@@ -0,0 +1,22 @@
|
||||
# Contributing to AI-For-Beginners
|
||||
|
||||
Thank you for your interest in contributing to AI-For-Beginners! We welcome translations, lesson fixes, and formatting corrections.
|
||||
|
||||
## Microsoft Contributor License Agreement (CLA)
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
|
||||
|
||||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
|
||||
|
||||
## How to Contribute
|
||||
|
||||
### 1. Fixing Typos / Code Errors
|
||||
If you find a typo or bug in any Jupyter notebook or lesson markdown file:
|
||||
1. Fork the repository.
|
||||
2. Fix the typo or broken link.
|
||||
3. Submit a Pull Request with a clear description of the fix.
|
||||
|
||||
### 2. Submitting Translations
|
||||
We welcome translations of the lessons into other languages! Please place translations under the `translations/` directory using the existing folder names there (for example `translations/es/`, `translations/pt-BR/`, `translations/zh-CN/`).
|
||||
|
||||
For more details, see [etc/CONTRIBUTING.md](etc/CONTRIBUTING.md).
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
@@ -0,0 +1,227 @@
|
||||
[](https://github.com/microsoft/AI-For-Beginners/blob/main/LICENSE)
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/graphs/contributors/)
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/issues/)
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/pulls/)
|
||||
[](http://makeapullrequest.com)
|
||||
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/watchers/)
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/network/)
|
||||
[](https://GitHub.com/microsoft/AI-For-Beginners/stargazers/)
|
||||
[](https://mybinder.org/v2/gh/microsoft/ai-for-beginners/HEAD)
|
||||
[](https://gitter.im/Microsoft/ai-for-beginners?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
[](https://discord.gg/nTYy5BXMWG)
|
||||
|
||||
# Artificial Intelligence for Beginners - A Curriculum
|
||||
|
||||
||
|
||||
|:---:|
|
||||
| AI For Beginners - _Sketchnote by [@girlie_mac](https://twitter.com/girlie_mac)_ |
|
||||
|
||||
Explore the world of **Artificial Intelligence** (AI) with our 12-week, 24-lesson curriculum! It includes practical lessons, quizzes, and labs. The curriculum is beginner-friendly and covers tools like TensorFlow and PyTorch, as well as ethics in AI
|
||||
|
||||
|
||||
### 🌐 Multi-Language Support
|
||||
|
||||
#### Supported via GitHub Action (Automated & Always Up-to-Date)
|
||||
|
||||
<!-- CO-OP TRANSLATOR LANGUAGES TABLE START -->
|
||||
[Arabic](./translations/ar/README.md) | [Bengali](./translations/bn/README.md) | [Bulgarian](./translations/bg/README.md) | [Burmese (Myanmar)](./translations/my/README.md) | [Chinese (Simplified)](./translations/zh-CN/README.md) | [Chinese (Traditional, Hong Kong)](./translations/zh-HK/README.md) | [Chinese (Traditional, Macau)](./translations/zh-MO/README.md) | [Chinese (Traditional, Taiwan)](./translations/zh-TW/README.md) | [Croatian](./translations/hr/README.md) | [Czech](./translations/cs/README.md) | [Danish](./translations/da/README.md) | [Dutch](./translations/nl/README.md) | [Estonian](./translations/et/README.md) | [Finnish](./translations/fi/README.md) | [French](./translations/fr/README.md) | [German](./translations/de/README.md) | [Greek](./translations/el/README.md) | [Hebrew](./translations/he/README.md) | [Hindi](./translations/hi/README.md) | [Hungarian](./translations/hu/README.md) | [Indonesian](./translations/id/README.md) | [Italian](./translations/it/README.md) | [Japanese](./translations/ja/README.md) | [Kannada](./translations/kn/README.md) | [Khmer](./translations/km/README.md) | [Korean](./translations/ko/README.md) | [Lithuanian](./translations/lt/README.md) | [Malay](./translations/ms/README.md) | [Malayalam](./translations/ml/README.md) | [Marathi](./translations/mr/README.md) | [Nepali](./translations/ne/README.md) | [Nigerian Pidgin](./translations/pcm/README.md) | [Norwegian](./translations/no/README.md) | [Persian (Farsi)](./translations/fa/README.md) | [Polish](./translations/pl/README.md) | [Portuguese (Brazil)](./translations/pt-BR/README.md) | [Portuguese (Portugal)](./translations/pt-PT/README.md) | [Punjabi (Gurmukhi)](./translations/pa/README.md) | [Romanian](./translations/ro/README.md) | [Russian](./translations/ru/README.md) | [Serbian (Cyrillic)](./translations/sr/README.md) | [Slovak](./translations/sk/README.md) | [Slovenian](./translations/sl/README.md) | [Spanish](./translations/es/README.md) | [Swahili](./translations/sw/README.md) | [Swedish](./translations/sv/README.md) | [Tagalog (Filipino)](./translations/tl/README.md) | [Tamil](./translations/ta/README.md) | [Telugu](./translations/te/README.md) | [Thai](./translations/th/README.md) | [Turkish](./translations/tr/README.md) | [Ukrainian](./translations/uk/README.md) | [Urdu](./translations/ur/README.md) | [Vietnamese](./translations/vi/README.md)
|
||||
|
||||
> **Prefer to Clone Locally?**
|
||||
>
|
||||
> This repository includes 50+ language translations which significantly increases the download size. To clone without translations, use sparse checkout:
|
||||
>
|
||||
> **Bash / macOS / Linux:**
|
||||
> ```bash
|
||||
> git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git
|
||||
> cd AI-For-Beginners
|
||||
> git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'
|
||||
> ```
|
||||
>
|
||||
> **CMD (Windows):**
|
||||
> ```cmd
|
||||
> git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git
|
||||
> cd AI-For-Beginners
|
||||
> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"
|
||||
> ```
|
||||
>
|
||||
> This gives you everything you need to complete the course with a much faster download.
|
||||
<!-- CO-OP TRANSLATOR LANGUAGES TABLE END -->
|
||||
|
||||
**If you wish to have additional translations languages supported are listed [here](https://github.com/Azure/co-op-translator/blob/main/getting_started/supported-languages.md)**
|
||||
|
||||
## Join the Community
|
||||
[](https://discord.gg/nTYy5BXMWG)
|
||||
|
||||
## What you will learn
|
||||
|
||||
**[Mindmap of the Course](http://soshnikov.com/courses/ai-for-beginners/mindmap.html)**
|
||||
|
||||
In this curriculum, you will learn:
|
||||
|
||||
* Different approaches to Artificial Intelligence, including the "good old" symbolic approach with **Knowledge Representation** and reasoning ([GOFAI](https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence)).
|
||||
* **Neural Networks** and **Deep Learning**, which are at the core of modern AI. We will illustrate the concepts behind these important topics using code in two of the most popular frameworks - [TensorFlow](http://Tensorflow.org) and [PyTorch](http://pytorch.org).
|
||||
* **Neural Architectures** for working with images and text. We will cover recent models but may be a bit lacking in the state-of-the-art.
|
||||
* Less popular AI approaches, such as **Genetic Algorithms** and **Multi-Agent Systems**.
|
||||
|
||||
What we will not cover in this curriculum:
|
||||
|
||||
> [Find all additional resources for this course in our Microsoft Learn collection](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)
|
||||
|
||||
* Business cases of using **AI in Business**. Consider taking [Introduction to AI for business users](https://docs.microsoft.com/learn/paths/introduction-ai-for-business-users/?WT.mc_id=academic-77998-bethanycheum) learning path on Microsoft Learn, or [AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-bethanycheum), developed in cooperation with [INSEAD](https://www.insead.edu/).
|
||||
* **Classic Machine Learning**, which is well described in our [Machine Learning for Beginners Curriculum](http://github.com/Microsoft/ML-for-Beginners).
|
||||
* Practical AI applications built using **[Cognitive Services](https://azure.microsoft.com/services/cognitive-services/?WT.mc_id=academic-77998-bethanycheum)**. For this, we recommend that you start with modules Microsoft Learn for [vision](https://docs.microsoft.com/learn/paths/create-computer-vision-solutions-azure-cognitive-services/?WT.mc_id=academic-77998-bethanycheum), [natural language processing](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-bethanycheum), **[Generative AI with Azure OpenAI Service](https://learn.microsoft.com/en-us/training/paths/develop-ai-solutions-azure-openai/?WT.mc_id=academic-77998-bethanycheum)** and others.
|
||||
* Specific ML **Cloud Frameworks**, such as [Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-bethanycheum), [Microsoft Fabric](https://learn.microsoft.com/en-us/training/paths/get-started-fabric/?WT.mc_id=academic-77998-bethanycheum), or [Azure Databricks](https://docs.microsoft.com/learn/paths/data-engineer-azure-databricks?WT.mc_id=academic-77998-bethanycheum). Consider using [Build and operate machine learning solutions with Azure Machine Learning](https://docs.microsoft.com/learn/paths/build-ai-solutions-with-azure-ml-service/?WT.mc_id=academic-77998-bethanycheum) and [Build and Operate Machine Learning Solutions with Azure Databricks](https://docs.microsoft.com/learn/paths/build-operate-machine-learning-solutions-azure-databricks/?WT.mc_id=academic-77998-bethanycheum) learning paths.
|
||||
* **Conversational AI** and **Chat Bots**. There is a separate [Create conversational AI solutions](https://docs.microsoft.com/learn/paths/create-conversational-ai-solutions/?WT.mc_id=academic-77998-bethanycheum) learning path, and you can also refer to [this blog post](https://soshnikov.com/azure/hello-bot-conversational-ai-on-microsoft-platform/) for more detail.
|
||||
* **Deep Mathematics** behind deep learning. For this, we would recommend [Deep Learning](https://www.amazon.com/Deep-Learning-Adaptive-Computation-Machine/dp/0262035618) by Ian Goodfellow, Yoshua Bengio and Aaron Courville, which is also available online at [https://www.deeplearningbook.org/](https://www.deeplearningbook.org/).
|
||||
|
||||
For a gentle introduction to _AI in the Cloud_ topics you may consider taking the [Get started with artificial intelligence on Azure](https://docs.microsoft.com/learn/paths/get-started-with-artificial-intelligence-on-azure/?WT.mc_id=academic-77998-bethanycheum) Learning Path.
|
||||
|
||||
# Content
|
||||
|
||||
| | Lesson Link | PyTorch/Keras/TensorFlow | Lab |
|
||||
| :-: | :------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------ |
|
||||
| 0 | [Course Setup](./lessons/0-course-setup/setup.md) | [Setup Your Development Environment](./lessons/0-course-setup/how-to-run.md) | |
|
||||
| I | [**Introduction to AI**](./lessons/1-Intro/README.md) | | |
|
||||
| 01 | [Introduction and History of AI](./lessons/1-Intro/README.md) | - | - |
|
||||
| II | **Symbolic AI** |
|
||||
| 02 | [Knowledge Representation and Expert Systems](./lessons/2-Symbolic/README.md) | [Expert Systems](./lessons/2-Symbolic/Animals.ipynb) / [Ontology](./lessons/2-Symbolic/FamilyOntology.ipynb) /[Concept Graph](./lessons/2-Symbolic/MSConceptGraph.ipynb) | |
|
||||
| III | [**Introduction to Neural Networks**](./lessons/3-NeuralNetworks/README.md) |||
|
||||
| 03 | [Perceptron](./lessons/3-NeuralNetworks/03-Perceptron/README.md) | [Notebook](./lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb) | [Lab](./lessons/3-NeuralNetworks/03-Perceptron/lab/README.md) |
|
||||
| 04 | [Multi-Layered Perceptron and Creating our own Framework](./lessons/3-NeuralNetworks/04-OwnFramework/README.md) | [Notebook](./lessons/3-NeuralNetworks/04-OwnFramework/OwnFramework.ipynb) | [Lab](./lessons/3-NeuralNetworks/04-OwnFramework/lab/README.md) |
|
||||
| 05 | [Intro to Frameworks (PyTorch/TensorFlow) and Overfitting](./lessons/3-NeuralNetworks/05-Frameworks/README.md) | [PyTorch](./lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb) / [Keras](./lessons/3-NeuralNetworks/05-Frameworks/IntroKeras.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/3-NeuralNetworks/05-Frameworks/lab/README.md) |
|
||||
| IV | [**Computer Vision**](./lessons/4-ComputerVision/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste) / [TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)| [Explore Computer Vision on Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) |
|
||||
| 06 | [Intro to Computer Vision. OpenCV](./lessons/4-ComputerVision/06-IntroCV/README.md) | [Notebook](./lessons/4-ComputerVision/06-IntroCV/OpenCV.ipynb) | [Lab](./lessons/4-ComputerVision/06-IntroCV/lab/README.md) |
|
||||
| 07 | [Convolutional Neural Networks](./lessons/4-ComputerVision/07-ConvNets/README.md) & [CNN Architectures](./lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md) | [PyTorch](./lessons/4-ComputerVision/07-ConvNets/ConvNetsPyTorch.ipynb) /[TensorFlow](./lessons/4-ComputerVision/07-ConvNets/ConvNetsTF.ipynb) | [Lab](./lessons/4-ComputerVision/07-ConvNets/lab/README.md) |
|
||||
| 08 | [Pre-trained Networks and Transfer Learning](./lessons/4-ComputerVision/08-TransferLearning/README.md) and [Training Tricks](./lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md) | [PyTorch](./lessons/4-ComputerVision/08-TransferLearning/TransferLearningPyTorch.ipynb) / [TensorFlow](./lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.ipynb) | [Lab](./lessons/4-ComputerVision/08-TransferLearning/lab/README.md) |
|
||||
| 09 | [Autoencoders and VAEs](./lessons/4-ComputerVision/09-Autoencoders/README.md) | [PyTorch](./lessons/4-ComputerVision/09-Autoencoders/AutoEncodersPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/09-Autoencoders/AutoencodersTF.ipynb) | |
|
||||
| 10 | [Generative Adversarial Networks & Artistic Style Transfer](./lessons/4-ComputerVision/10-GANs/README.md) | [PyTorch](./lessons/4-ComputerVision/10-GANs/GANPyTorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/10-GANs/GANTF.ipynb) | |
|
||||
| 11 | [Object Detection](./lessons/4-ComputerVision/11-ObjectDetection/README.md) | [TensorFlow](./lessons/4-ComputerVision/11-ObjectDetection/ObjectDetection.ipynb) | [Lab](./lessons/4-ComputerVision/11-ObjectDetection/lab/README.md) |
|
||||
| 12 | [Semantic Segmentation. U-Net](./lessons/4-ComputerVision/12-Segmentation/README.md) | [PyTorch](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationPytorch.ipynb) / [TensorFlow](./lessons/4-ComputerVision/12-Segmentation/SemanticSegmentationTF.ipynb) | |
|
||||
| V | [**Natural Language Processing**](./lessons/5-NLP/README.md) | [PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste) /[TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste) | [Explore Natural Language Processing on Microsoft Azure](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum)|
|
||||
| 13 | [Text Representation. Bow/TF-IDF](./lessons/5-NLP/13-TextRep/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/TextRepresentationTF.ipynb) | |
|
||||
| 14 | [Semantic word embeddings. Word2Vec and GloVe](./lessons/5-NLP/14-Embeddings/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb) | |
|
||||
| 15 | [Language Modeling. Training your own embeddings](./lessons/5-NLP/15-LanguageModeling/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-PyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling/CBoW-TF.ipynb) | [Lab](./lessons/5-NLP/15-LanguageModeling/lab/README.md) |
|
||||
| 16 | [Recurrent Neural Networks](./lessons/5-NLP/16-RNN/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNPyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/RNNTF.ipynb) | |
|
||||
| 17 | [Generative Recurrent Networks](./lessons/5-NLP/17-GenerativeNetworks/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativePyTorch.ipynb) / [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/GenerativeTF.ipynb) | [Lab](./lessons/5-NLP/17-GenerativeNetworks/lab/README.md) |
|
||||
| 18 | [Transformers. BERT.](./lessons/5-NLP/18-Transformers/README.md) | [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersPyTorch.ipynb) /[TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/TransformersTF.ipynb) | |
|
||||
| 19 | [Named Entity Recognition](./lessons/5-NLP/19-NER/README.md) | [TensorFlow](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/19-NER/NER-TF.ipynb) | [Lab](./lessons/5-NLP/19-NER/lab/README.md) |
|
||||
| 20 | [Large Language Models, Prompt Programming and Few-Shot Tasks](./lessons/5-NLP/20-LangModels/README.md) | [PyTorch](https://microsoft.github.io/AI-For-Beginners/lessons/5-NLP/20-LangModels/GPT-PyTorch.ipynb) | |
|
||||
| VI | **Other AI Techniques** || |
|
||||
| 21 | [Genetic Algorithms](./lessons/6-Other/21-GeneticAlgorithms/README.md) | [Notebook](./lessons/6-Other/21-GeneticAlgorithms/Genetic.ipynb) | |
|
||||
| 22 | [Deep Reinforcement Learning](./lessons/6-Other/22-DeepRL/README.md) | [PyTorch](./lessons/6-Other/22-DeepRL/CartPole-RL-PyTorch.ipynb) /[TensorFlow](./lessons/6-Other/22-DeepRL/CartPole-RL-TF.ipynb) | [Lab](./lessons/6-Other/22-DeepRL/lab/README.md) |
|
||||
| 23 | [Multi-Agent Systems](./lessons/6-Other/23-MultiagentSystems/README.md) | | |
|
||||
| VII | **AI Ethics** | | |
|
||||
| 24 | [AI Ethics and Responsible AI](./lessons/7-Ethics/README.md) | [Microsoft Learn: Responsible AI Principles](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste) | |
|
||||
| IX | **Extras** | | |
|
||||
| 25 | [Multi-Modal Networks, CLIP and VQGAN](./lessons/X-Extras/X1-MultiModal/README.md) | [Notebook](./lessons/X-Extras/X1-MultiModal/Clip.ipynb) | |
|
||||
|
||||
## Each lesson contains
|
||||
|
||||
* Pre-reading material
|
||||
* Executable Jupyter Notebooks, which are often specific to the framework (**PyTorch** or **TensorFlow**). The executable notebook also contains a lot of theoretical material, so to understand the topic you need to go through at least one version of the notebook (either PyTorch or TensorFlow).
|
||||
* **Labs** available for some topics, which give you an opportunity to try applying the material you have learned to a specific problem.
|
||||
* Some sections contain links to [**MS Learn**](https://learn.microsoft.com/en-us/collections/7w28iy2xrqzdj0?WT.mc_id=academic-77998-bethanycheum) modules that cover related topics.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### 🎯 New to AI? Start Here!
|
||||
|
||||
If you're completely new to AI and want quick, hands-on examples, check out our [**Beginner-Friendly Examples**](./examples/README.md)! These include:
|
||||
|
||||
- 🌟 **Hello AI World** - Your first AI program (pattern recognition)
|
||||
- 🧠 **Simple Neural Network** - Build a neural network from scratch
|
||||
- 🖼️ **Image Classifier** - Classify images with detailed comments
|
||||
- 💬 **Text Sentiment** - Analyze positive/negative text
|
||||
|
||||
These examples are designed to help you understand AI concepts before diving into the full curriculum.
|
||||
|
||||
### 📚 Full Curriculum Setup
|
||||
|
||||
- We have created a [setup lesson](./lessons/0-course-setup/setup.md) to help you with setting up your development environment. - For Educators, we have created a [curricula setup lesson](./lessons/0-course-setup/for-teachers.md) for you too!
|
||||
- How to [Run the code in a VSCode or a Codespace](./lessons/0-course-setup/how-to-run.md)
|
||||
|
||||
Follow these steps:
|
||||
|
||||
Fork the Repository: Click on the "Fork" button at the top-right corner of this page.
|
||||
|
||||
Clone the Repository: `git clone https://github.com/microsoft/AI-For-Beginners.git`
|
||||
|
||||
Don't forget to star (🌟) this repo to find it easier later.
|
||||
|
||||
## Meet other Learners
|
||||
|
||||
Join our [official AI Discord server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-bethanycheum) to meet and network with other learners taking this course and get support.
|
||||
|
||||
If you have product feedback or questions whilst building visit our [Azure AI Foundry Developer Forum](https://aka.ms/foundry/forum)
|
||||
|
||||
## Quizzes
|
||||
|
||||
> **A note about quizzes**: All quizzes are contained in the Quiz-app folder in etc\quiz-app, or [Online Here](https://ff-quizzes.netlify.app/) They are linked from within the lessons the quiz app can be run locally or deployed to Azure; follow the instruction in the `quiz-app` folder. They are gradually being localized.
|
||||
|
||||
## Help Wanted
|
||||
|
||||
Do you have suggestions or found spelling or code errors? Raise an issue or create a pull request.
|
||||
|
||||
## Special Thanks
|
||||
|
||||
* **✍️ Primary Author:** [Dmitry Soshnikov](http://soshnikov.com), PhD
|
||||
* **🔥 Editor:** [Jen Looper](https://twitter.com/jenlooper), PhD
|
||||
* **🎨 Sketchnote illustrator:** [Tomomi Imura](https://twitter.com/girlie_mac)
|
||||
* **✅ Quiz Creator:** [Lateefah Bello](https://github.com/CinnamonXI), [MLSA](https://studentambassadors.microsoft.com/)
|
||||
* **🙏 Core Contributors:** [Evgenii Pishchik](https://github.com/Pe4enIks)
|
||||
|
||||
## Other Curricula
|
||||
|
||||
Our team produces other curricula! Check out:
|
||||
|
||||
<!-- CO-OP TRANSLATOR OTHER COURSES START -->
|
||||
### LangChain
|
||||
[](https://aka.ms/langchain4j-for-beginners)
|
||||
[](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin)
|
||||
[](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin)
|
||||
---
|
||||
|
||||
### Azure / Edge / MCP / Agents
|
||||
[](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
|
||||
---
|
||||
|
||||
### Generative AI Series
|
||||
[](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst)
|
||||
[-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst)
|
||||
[-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst)
|
||||
|
||||
---
|
||||
|
||||
### Core Learning
|
||||
[](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung)
|
||||
[](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst)
|
||||
|
||||
---
|
||||
|
||||
### Copilot Series
|
||||
[](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst)
|
||||
[](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst)
|
||||
<!-- CO-OP TRANSLATOR OTHER COURSES END -->
|
||||
|
||||
## Getting Help
|
||||
|
||||
If you get stuck or have any questions about building AI apps. Join fellow learners and experienced developers in discussions about MCP. It's a supportive community where questions are welcome and knowledge is shared freely.
|
||||
|
||||
[](https://discord.gg/nTYy5BXMWG)
|
||||
|
||||
If you have product feedback or errors while building visit:
|
||||
|
||||
[](https://aka.ms/foundry/forum)
|
||||
@@ -0,0 +1,7 @@
|
||||
# WeHub 来源说明
|
||||
|
||||
- 原始项目:`microsoft/AI-For-Beginners`
|
||||
- 原始仓库:https://github.com/microsoft/AI-For-Beginners
|
||||
- 导入方式:上游默认分支的最新快照
|
||||
- 原作者、版权和许可证信息以原始仓库及本仓库 LICENSE 为准
|
||||
- 本文件仅用于记录来源,不代表 WeHub 是原项目作者
|
||||
@@ -0,0 +1,41 @@
|
||||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
* Full paths of source file(s) related to the manifestation of the issue
|
||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
||||
* Any special configuration required to reproduce the issue
|
||||
* Step-by-step instructions to reproduce the issue
|
||||
* Proof-of-concept or exploit code (if possible)
|
||||
* Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
||||
@@ -0,0 +1,25 @@
|
||||
name: ai4beg
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- ipykernel=6.4.1
|
||||
- ipython=7.27.0
|
||||
- ipywidgets=7.6.5
|
||||
- jupyter=1.0.0
|
||||
- matplotlib=3.4.2
|
||||
- numpy=1.22.3
|
||||
- python=3.8.12
|
||||
- requests=2.26.0
|
||||
- scikit-learn=0.24.2
|
||||
- scipy=1.6.2
|
||||
- pip=21.0.1
|
||||
- conda-forge::opencv=4.5
|
||||
- setuptools=58.0.4
|
||||
- pytorch::pytorch=1.11.0
|
||||
- pytorch::torchtext=0.12.0
|
||||
- pytorch::torchvision=0.12.0
|
||||
- pytorch::torchdata=0.3.0
|
||||
- pip:
|
||||
- -r requirements.txt
|
||||
- --default-timeout=120
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
conda update -n base -c conda-forge conda
|
||||
@@ -0,0 +1,22 @@
|
||||
gensim==4.3.3
|
||||
gym==0.26.2
|
||||
huggingface==0.0.1
|
||||
imageio==2.35.0
|
||||
keras==3.13.2
|
||||
nltk==3.9.4
|
||||
pandas==2.0.3
|
||||
pillow==12.2.0
|
||||
pygame==2.6.0
|
||||
scikit-image==0.21.0
|
||||
seaborn==0.13.2
|
||||
smart-open==7.0.4
|
||||
tensorboard-data-server==0.7.2
|
||||
tensorflow-datasets==4.9.2
|
||||
tensorflow-hub==0.16.1
|
||||
tensorflow-text==2.13.0
|
||||
tensorflow==2.13.1
|
||||
tensorboard==2.13.0
|
||||
tokenizers==0.19.1
|
||||
torchinfo==1.8.0
|
||||
tqdm==4.66.5
|
||||
transformers==5.3.0
|
||||
@@ -0,0 +1,24 @@
|
||||
name: ai4beg
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- ipykernel
|
||||
- ipython
|
||||
- ipywidgets
|
||||
- jupyter
|
||||
- matplotlib=3.9
|
||||
- numpy=1.26
|
||||
- python
|
||||
- requests=2.32
|
||||
- scikit-learn
|
||||
- scipy=1.13
|
||||
- pip
|
||||
- conda-forge::opencv
|
||||
- setuptools
|
||||
- pytorch::pytorch
|
||||
- pytorch::torchtext
|
||||
- pytorch::torchvision
|
||||
- pytorch::torchdata
|
||||
- pip:
|
||||
- -r requirements.txt
|
||||
@@ -0,0 +1,9 @@
|
||||
# Microsoft Open Source Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
|
||||
Resources:
|
||||
|
||||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
||||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
||||
@@ -0,0 +1,24 @@
|
||||
# Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to
|
||||
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
|
||||
and actually do, grant us the rights to use your contribution. For details, visit
|
||||
https://cla.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA-bot will automatically determine whether you need
|
||||
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
|
||||
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
||||
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
# Looking for Contributions
|
||||
|
||||
We are currently actively looking for contributions on the following topics:
|
||||
|
||||
- [ ] Write section on Deep Reinforcement Learning
|
||||
- [ ] Improve section + notebook on Object Detection
|
||||
- [ ] PyTorch Lightning (for [this section](https://github.com/microsoft/AI-For-Beginners/blob/main/3-NeuralNetworks/05-Frameworks/README.md))
|
||||
- [ ] Write section + samples on Named Entity Recognition
|
||||
- [ ] Create samples for training our own embeddings for [this section](https://github.com/microsoft/AI-For-Beginners/tree/main/5-NLP/15-LanguageModeling)
|
||||
@@ -0,0 +1,73 @@
|
||||
# AI
|
||||
|
||||
## [Introduction to AI](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/1-Intro/README.md)
|
||||
- AI Definition
|
||||
- History of AI
|
||||
- Approaches to AI
|
||||
- Top-down/Symbolic
|
||||
- Bottom-up/Neural
|
||||
- Evolutionary
|
||||
- Synergetic / Emergent AI
|
||||
- [Microsoft AI Business School](https://www.microsoft.com/ai/ai-business-school/?WT.mc_id=academic-77998-cacaste)
|
||||
|
||||
## [Symbolic AI](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/2-Symbolic/README.md)
|
||||
- Knowledge Representation
|
||||
- [Expert Systems](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/2-Symbolic/Animals.ipynb)
|
||||
- [Ontologies](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/2-Symbolic/FamilyOntology.ipynb)
|
||||
- Semantic Web
|
||||
|
||||
## [Neural Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/README.md)
|
||||
- [Perceptron](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/03-Perceptron/README.md)
|
||||
- [Multi-Layered Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/04-OwnFramework/README.md)
|
||||
- [Intro to Frameworks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/05-Frameworks/README.md)
|
||||
- [PyTorch](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/05-Frameworks/IntroPyTorch.ipynb)
|
||||
- [TensorFlow](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/05-Frameworks/IntroKerasTF.md)
|
||||
- [Overfitting](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/3-NeuralNetworks/05-Frameworks/Overfitting.md)
|
||||
|
||||
## [Computer Vision](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/README.md)
|
||||
- On MS Learn
|
||||
- [AI Fundamentals: Explore Computer Vision](https://docs.microsoft.com/learn/paths/explore-computer-vision-microsoft-azure/?WT.mc_id=academic-77998-cacaste)
|
||||
- [CV with PyTorch](https://docs.microsoft.com/learn/modules/intro-computer-vision-pytorch/?WT.mc_id=academic-77998-cacaste)
|
||||
- [CV with TensorFlow](https://docs.microsoft.com/learn/modules/intro-computer-vision-TensorFlow/?WT.mc_id=academic-77998-cacaste)
|
||||
- [Intro to CV. OpenCV](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/06-IntroCV/README.md)
|
||||
- [Convolutional Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/07-ConvNets/README.md)
|
||||
- [CNN Architectures](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/07-ConvNets/CNN_Architectures.md)
|
||||
- [Trasnsfer Learning](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/08-TransferLearning/README.md)
|
||||
- [Training Tricks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/08-TransferLearning/TrainingTricks.md)
|
||||
- [Autoencoders and VAEs](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/09-Autoencoders/README.md)
|
||||
- [Generative Adversarial Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/10-GANs/README.md)
|
||||
- [Style Transfer](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/10-GANs/StyleTransfer.ipynb)
|
||||
- [Object Detection](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/11-ObjectDetection/README.md)
|
||||
- [Segmentation](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/12-Segmentation/README.md)
|
||||
|
||||
## [Natural Language Processing](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/README.md)
|
||||
- On MS Learn
|
||||
- [AI Fundamentals: Explore NLP](https://docs.microsoft.com/learn/paths/explore-natural-language-processing/?WT.mc_id=academic-77998-cacaste)
|
||||
- [NLP with PyTorch](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-pytorch/?WT.mc_id=academic-77998-cacaste)
|
||||
- [NLP with TensorFlow](https://docs.microsoft.com/learn/modules/intro-natural-language-processing-TensorFlow/?WT.mc_id=academic-77998-cacaste)
|
||||
- [Text Representation](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/13-TextRep/README.md)
|
||||
- Bag of Words
|
||||
- TF/IDF
|
||||
- [Semantic Embeddings](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/14-Embeddings/README.md)
|
||||
- Word2Vec
|
||||
- GloVE
|
||||
- [Language Modeling](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/15-LanguageModeling)
|
||||
- [Recurrent Neural Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/16-RNN/README.md)
|
||||
- LSTM
|
||||
- GRU
|
||||
- [Generative Recurrent Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/17-GenerativeNetworks/README.md)
|
||||
- [Transformers and BERT](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/18-Transformers/README.md)
|
||||
- [Named Entity Recognition](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/19-NER/README.md)
|
||||
- [Text Generation and GPT](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/5-NLP/20-LanguageModels/README.md)
|
||||
## Other Techniques
|
||||
- [Genetic Algorithms](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/6-Other/21-GeneticAlgorithms/README.md)
|
||||
- [Deep Reinforcement Learning](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/6-Other/22-DeepRL/README.md)
|
||||
- [Multi-Agent Systems](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/6-Other/23-MultiagentSystems/README.md)
|
||||
|
||||
## [AI Ethics](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/7-Ethics/README.md)
|
||||
- [MS Learn on Responsible AI](https://docs.microsoft.com/learn/paths/responsible-ai-business-principles/?WT.mc_id=academic-77998-cacaste)
|
||||
## Extras
|
||||
- [Multimodal Networks](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/X-Extras/X1-MultiModal/README.md)
|
||||
- [CLIP](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/X-Extras/X1-MultiModal/Clip.ipynb)
|
||||
- DALL-E
|
||||
- VQ-GAN
|
||||
|
After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,13 @@
|
||||
# Support
|
||||
|
||||
## How to file issues and get help
|
||||
|
||||
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
|
||||
issues before filing new issues to avoid duplicates. For new issues, file your bug or
|
||||
feature request as a new Issue.
|
||||
|
||||
For help and questions about using this project, please use the Discussion Boards.
|
||||
|
||||
## Microsoft Support Policy
|
||||
|
||||
Support for this project is limited to the resources listed above.
|
||||
@@ -0,0 +1,33 @@
|
||||
# Contribute by translating lessons
|
||||
|
||||
We welcome translations for the lessons in this curriculum!
|
||||
|
||||
## Guidelines
|
||||
|
||||
There are folders in each lesson folder and lesson introduction folder which contain the translated markdown files.
|
||||
|
||||
> Note, please do not translate any code in the code sample files; the only things to translate are README, assignments, and the quizzes. Thanks!
|
||||
|
||||
Translated files should follow this naming convention:
|
||||
|
||||
**README._[language]_.md**
|
||||
|
||||
where _[language]_ is a two letter language abbreviation following the ISO 639-1 standard (e.g. `README.es.md` for Spanish and `README.nl.md` for Dutch).
|
||||
|
||||
**assignment._[language]_.md**
|
||||
|
||||
Similar to Readme's, please translate the assignments as well.
|
||||
|
||||
**Quizzes**
|
||||
|
||||
1. Add your translation to the quiz-app by adding a file here: https://github.com/microsoft/AI-For-Beginners/tree/main/etc/quiz-app/src/assets/translations, with proper naming convention (en.json, fr.json). **Please don't localize the words 'true' or 'false' however. thanks!**
|
||||
|
||||
2. Add your language code to the dropdown in the quiz-app's App.vue file.
|
||||
|
||||
3. Edit the quiz-app's [translations index.js file](https://github.com/microsoft/AI-For-Beginners/blob/main/etc/quiz-app/src/assets/translations/index.js) to add your language.
|
||||
|
||||
4. Finally, edit ALL the quiz links in your translated README.md files to point directly to your translated quiz: https://red-field-0a6ddfd03.1.azurestaticapps.net/quiz/1 becomes https://red-field-0a6ddfd03.1.azurestaticapps.net/quiz/1?loc=id
|
||||
|
||||
**THANK YOU**
|
||||
|
||||
We truly appreciate your efforts!
|
||||
@@ -0,0 +1,124 @@
|
||||
# Quizzes
|
||||
|
||||
These quizzes are the pre- and post-lecture quizzes for the AI curriculum at https://aka.ms/ai-beginners
|
||||
|
||||
## Adding a translated quiz set
|
||||
|
||||
Add a quiz translation by creating matching quiz structures in the `assets/translations` folders. The canonical quizzes are in `assets/translations/en`. The quizzes are broken into several groupings by lesson. Make sure to align the numbering with the proper quiz section. There are 40 quizzes total in this curriculum, with the count starting at 0.
|
||||
|
||||
After editing the translations, edit the index.js file in the translation folder to import all the files following the conventions in `en`.
|
||||
|
||||
Edit the `index.js` file in `assets/translations` to import the new translated files.
|
||||
|
||||
Then, edit the dropdown in `App.vue` in this app to add your language. Match the localized abbreviation to the folder name for your language.
|
||||
|
||||
Finally, edit all the quiz links in the translated lessons, if they exist, to include this localization as a query parameter: `?loc=fr` for example.
|
||||
|
||||
## Project setup
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
||||
Credits: Thanks to the original version of this quiz app: https://github.com/arpan45/simple-quiz-vue
|
||||
|
||||
## Deploying to Azure
|
||||
|
||||
Here’s a step-by-step guide to help you get started:
|
||||
|
||||
1. Fork the a GitHub Repository
|
||||
Ensure your static web app code is in your GitHub repository. Fork this repository.
|
||||
|
||||
2. Create an Azure Static Web App
|
||||
- Create and [Azure account](http://azure.microsoft.com)
|
||||
- Go to the [Azure portal](https://portal.azure.com)
|
||||
- Click on “Create a resource” and search for “Static Web App”.
|
||||
- Click “Create”.
|
||||
|
||||
3. Configure the Static Web App
|
||||
- Basics: Subscription: Select your Azure subscription.
|
||||
- Resource Group: Create a new resource group or use an existing one.
|
||||
- Name: Provide a name for your static web app.
|
||||
- Region: Choose the region closest to your users.
|
||||
|
||||
- #### Deployment Details:
|
||||
- Source: Select “GitHub”.
|
||||
- GitHub Account: Authorize Azure to access your GitHub account.
|
||||
- Organization: Select your GitHub organization.
|
||||
- Repository: Choose the repository containing your static web app.
|
||||
- Branch: Select the branch you want to deploy from.
|
||||
|
||||
- #### Build Details:
|
||||
- Build Presets: Choose the framework your app is built with (e.g., React, Angular, Vue, etc.).
|
||||
- App Location: Specify the folder containing your app code (e.g., / if it’s in the root).
|
||||
- API Location: If you have an API, specify its location (optional).
|
||||
- Output Location: Specify the folder where the build output is generated (e.g., build or dist).
|
||||
|
||||
4. Review and Create
|
||||
Review your settings and click “Create”. Azure will set up the necessary resources and create a GitHub Actions workflow in your repository.
|
||||
|
||||
5. GitHub Actions Workflow
|
||||
Azure will automatically create a GitHub Actions workflow file in your repository (.github/workflows/azure-static-web-apps-<name>.yml). This workflow will handle the build and deployment process.
|
||||
|
||||
6. Monitor the Deployment
|
||||
Go to the “Actions” tab in your GitHub repository.
|
||||
You should see a workflow running. This workflow will build and deploy your static web app to Azure.
|
||||
Once the workflow completes, your app will be live on the provided Azure URL.
|
||||
|
||||
### Example Workflow File
|
||||
|
||||
Here’s an example of what the GitHub Actions workflow file might look like:
|
||||
name: Azure Static Web Apps CI/CD
|
||||
```
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build_and_deploy_job:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and Deploy Job
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build And Deploy
|
||||
id: builddeploy
|
||||
uses: Azure/static-web-apps-deploy@v1
|
||||
with:
|
||||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
action: "upload"
|
||||
app_location: "etc/quiz-app # App source code path"
|
||||
api_location: ""API source code path optional
|
||||
output_location: "dist" #Built app content directory - optional
|
||||
```
|
||||
|
||||
### Additional Resources
|
||||
- [Azure Static Web Apps Documentation](https://learn.microsoft.com/azure/static-web-apps/getting-started)
|
||||
- [GitHub Actions Documentation](https://docs.github.com/actions/use-cases-and-examples/deploying/deploying-to-azure-static-web-app)
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
html{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#252d4a}nav{background-color:#252d4a;padding:1em;margin-bottom:20px}nav a{color:#fff;text-align:right}ul{list-style-type:none;margin:0;padding:0;overflow:hidden}li{float:left}.title{color:#fff;font-weight:700;font-size:x-large;float:right}.link{display:list-item}.message,h1,h2,h3{text-align:center}.error{color:red}.complete{color:green}.card{width:60%;border:solid #252d4a;border-radius:5px;margin:auto;padding:1em}.btn{min-width:50%;text-align:center;cursor:pointer;margin-bottom:5px;width:50%;font-size:16px;color:#fff;background-color:#252d4a;border-radius:5px;padding:5px;justify-content:flex-start;align-items:center}.ans-btn{justify-content:center;display:flex;margin:4px auto}
|
||||
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>quizzes</title><link href="/css/app.67375a05.css" rel="preload" as="style"><link href="/js/app.dfcb35f3.js" rel="preload" as="script"><link href="/js/chunk-vendors.c1571e8f.js" rel="preload" as="script"><link href="/css/app.67375a05.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but quizzes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.c1571e8f.js"></script><script src="/js/app.dfcb35f3.js"></script></body></html>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"route": "/*",
|
||||
"serve": "/index.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"route": "/*",
|
||||
"serve": "/index.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<router-link class="navlink" to="/">Home</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<label for="locale">locale</label>
|
||||
</li>
|
||||
<li>
|
||||
<select v-model="locale">
|
||||
<option>en</option>
|
||||
<option>es</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="title">{{ questions[locale][0].title }}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="app">
|
||||
|
||||
<router-view>
|
||||
<Quiz />
|
||||
</router-view>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Quiz from "@/components/Quiz.vue";
|
||||
import messages from "@/assets/translations";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
computed: {
|
||||
questions() {
|
||||
return messages;
|
||||
},
|
||||
|
||||
},
|
||||
i18n: { messages },
|
||||
components: {
|
||||
Quiz,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
locale: "",
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
locale(val) {
|
||||
this.$root.$i18n.locale = val;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.route = this.$route.params.id;
|
||||
if (this.$route.query.loc) {
|
||||
this.locale = this.$route.query.loc;
|
||||
} else {
|
||||
this.locale = "en";
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #252d4a;
|
||||
}
|
||||
nav {
|
||||
background-color: #252d4a;
|
||||
padding: 1em;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: white;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.title {
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
font-size: x-large;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
.message {
|
||||
text-align: center;
|
||||
}
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
.complete {
|
||||
color: green;
|
||||
}
|
||||
.card {
|
||||
width: 60%;
|
||||
border: #252d4a solid;
|
||||
border-radius: 5px;
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
}
|
||||
.btn {
|
||||
min-width: 50%;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin-bottom: 5px;
|
||||
width: 50%;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
background-color: #252d4a;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.ans-btn {
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
margin: 4px auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
import x1 from "./lesson-1.json";
|
||||
import x2 from "./lesson-2.json";
|
||||
import x3 from "./lesson-3.json";
|
||||
import x4 from "./lesson-4.json";
|
||||
import x5 from "./lesson-5.json";
|
||||
import x6 from "./lesson-6.json";
|
||||
import x7 from "./lesson-7.json";
|
||||
import x8 from "./lesson-8.json";
|
||||
import x9 from "./lesson-9.json";
|
||||
import x10 from "./lesson-10.json";
|
||||
import x11 from "./lesson-11.json";
|
||||
import x12 from "./lesson-12.json";
|
||||
import x13 from "./lesson-13.json";
|
||||
import x14 from "./lesson-14.json";
|
||||
import x15 from "./lesson-15.json";
|
||||
import x16 from "./lesson-16.json";
|
||||
import x17 from "./lesson-17.json";
|
||||
import x18 from "./lesson-18.json";
|
||||
import x19 from "./lesson-19.json";
|
||||
import x20 from "./lesson-20.json";
|
||||
import x21 from "./lesson-21.json";
|
||||
import x22 from "./lesson-22.json";
|
||||
import x23 from "./lesson-23.json";
|
||||
import x24 from "./lesson-24.json";
|
||||
const quiz = { 0 : x1[0], 1 : x2[0], 2 : x3[0], 3 : x4[0], 4 : x5[0], 5 : x6[0], 6 : x7[0], 7 : x8[0], 8 : x9[0], 9 : x10[0], 10 : x11[0], 11 : x12[0], 12 : x13[0], 13 : x14[0], 14 : x15[0], 15 : x16[0], 16 : x17[0], 17 : x18[0], 18 : x19[0], 19 : x20[0], 20 : x21[0], 21 : x22[0], 22 : x23[0], 23 : x24[0] };
|
||||
export default quiz;
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 101,
|
||||
"title": "Introduction to AI: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "A famous 19th century proto-computer engineer was",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Charles Barkley",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Charles Babbage",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Charles Darwin",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Weak AI is a system designed to solve many tasks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Chat bots are an example of truly intelligent systems",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "false, they are usually designed by a series of rules.",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "true, they are usually considered to be 'intelligent",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false, but they are increasingly able to pass Turing tests as they become more sophisticated.",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 201,
|
||||
"title": "Introduction to AI: Post-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "A top-down approach to AI is a model of reasoning called",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "strategic reasoning",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "symbolic reasoning",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "synergistic reasoning",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A bottom-up approach to AI is based on neural networks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The AI Winter occurred in this era",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1950s",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "1960s",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "1970s",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 110,
|
||||
"title": "Generative Adversarial Networks: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Generators take vectors and produce ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "videos",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "image",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "gif",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "GANs is short for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "General adversarial networks",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Generative advisor networks",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Generative adversarial networks",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "GAN uses ____ neural networks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 210,
|
||||
"title": "Generative Adversarial Networks: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "We can use Batch normalization and BatchNorm1D to stabilize the training",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Deep Convolutional GAN uses convolutional layers for ____ and ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "generator, discriminator",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "CNN, generator",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "training, testing",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Problems of GAN training includes",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Sensitivity to hyperparameters",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Keeping balance between generator and discriminator",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "all of the above",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 111,
|
||||
"title": "Object Detection: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Neural networks can only be used to classify images",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "With object detection, we don't just get the class of an object, but also its ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "shape",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "location",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "type",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "How many objects can an object detection model detect?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "two",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "any number",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 211,
|
||||
"title": "Object Detection: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "An Object detection model gives us",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "object class",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "bounding box",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both class and bounding box",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which object detection models are faster?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one-pass models",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "region proposal networks",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Fast R-CNN",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which metric can be used to determine how well bounding boxes are aligned?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "accuracy",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "precision",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "IoU",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,123 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 112,
|
||||
"title": "Segmentation: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "How many segmentation algorithm are there?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Segmentation is a _____ task",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "computer vision",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "natural language processing",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "neural networks",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Segmentation networks consist of ____ and ____ parts",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "classifier, divider",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "encoder, decoder",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "generator, discriminator",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 212,
|
||||
"title": "Segmentation: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "____ extracts features from an input image",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "decoder",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "generator",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "encoder",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "____ transforms input features into mask image",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "decoder",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "generator",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "encoder",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "SegNet relies on ____ to train multi-layered network",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "batch normalization",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "height normalization",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "weight normalization",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 113,
|
||||
"title": "Text Representation: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Each word in a Bag of Words is linked to a vector index",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Text can be represented using _____ approaches",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Character level representation represents each _____ as a number",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "letter",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "word",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "symbol",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 213,
|
||||
"title": "Text Representation: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Word level representation represents _____ as a number",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "letter",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "word",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "symbol",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "N-Grams refers to _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "combination of n number of words and symbols",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "combination of n number of letters",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "combination of n number of Words",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The main drawback of N-gram is that the vocabulary size grows fast",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,111 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 114,
|
||||
"title": "Embeddings: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Embedding is used to represent words with _____ dimensional dense vectors",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "lower",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "higher",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "average",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Word2Vec pre-trained embeddings can also be used in place of embedding layer in neural networks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Using embedding layer we cannot switch from bag-of-words to embedding bag",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 214,
|
||||
"title": "Embeddings: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Word2Vec has _____ main architectures",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Word sense disambiguation is a limitation of traditional pretrained embedding representations",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "An embedding layer takes _____ as input",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "word",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "symbol",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "number",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,123 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 115,
|
||||
"title": "Language Modeling: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Which of the following can be considered a language model?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Word2Vec embeddings",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Embedding layer in RNN",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "RNN used for text classification",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A language model should be able to ____ the next word in the sentence",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "use",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "predict",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "guess",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Language models are trained on",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "language vocabulary",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "specially labeled data",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "any natural text",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 215,
|
||||
"title": "Language Modeling: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Which of the architectures predicts a word from neighboring words?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "CBoW",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Skip-gram",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "N-Gram",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "When we train a CBoW model, we obtain",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "A model that can generate text",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Word2Vec embedding vectors",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Text classification model",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The CBoW model is based on",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Dense neural network",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Convolutional neural network",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Recurrent neural network",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 116,
|
||||
"title": "RNN: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "RNN is short for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "regression neural network",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "recurrent neural network",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "re-iterative neural network",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A simple RNN cell has two weight _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "matrices",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "cell",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "neuron",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "vanishing gradients is a problem of _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "RNN",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "CNN",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "KNN",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 216,
|
||||
"title": "RNN: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "_____ takes some information from the input and hidden vector, and inserts it into state",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "forget gate",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "output gate",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "input gate",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Bidirectional RNNs runs recurrent computation in _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "both directions",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "north-west direction",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "left-right direction",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "All RNN Cells have the same shareable weights",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 117,
|
||||
"title": "Generative networks: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "RNNs can be for generative tasks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "yes",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "no",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "_____ is a traditional neural network with one input and one output",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one-to-one",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "sequence-to-sequence",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "one-to-many",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "RNN generates texts by generating next output token for each input token",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 217,
|
||||
"title": "Generative networks: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Output encoder converts hidden state into _____ output",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one-hot-encoded",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "sequence",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "number",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Selecting the character with higher probabilities always gives a meaningful text.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "maybe",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Many-to-many can also be referred to as _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one-to-one",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "sequence-to-sequence",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "one-to-many",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 118,
|
||||
"title": "Transformers: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Attention mechanism provides a means of _____ the impact of an inout vector on an output prediction of RNN",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "weighting",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "training",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "testing",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "BERT is an acronym for",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Bidirectional Encoded Representations From Transformers",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Bidirectional Encoder Representations From Transformers",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Bidirectional Encoder Representatives of Transformers",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "In positional encoding the relative position of the token is represented by number of steps",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 218,
|
||||
"title": "Transformers: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Positional embedding _____ the original token and its position within the sequence",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "separates",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "compares",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "embeds",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Multi-Head Attention is used in transformers to give network the power to capture _____ of dependencies",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "different types",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "same type",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "none",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "In transformers attention is used in _____ instances",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 119,
|
||||
"title": "Named Entity Recognition: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "What does NER stands for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Nearest Estimated Region",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Nearest Entity Region",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Named Entity Recognition",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "An entity always consists of one token",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "To train NER model, we need",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Labeled dataset",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Any natural text",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Translated texts in two languages",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 219,
|
||||
"title": "Named Entity Recognition: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "NER model is essentially a ____ model",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "text classification",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "token classification",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "text regression",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which neural network types can be used for NER?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "RNNs",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Transformers",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Both RNNs and Transformers",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "NER model is a good example of ____ network architecture",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "one-to-one",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "one-to-many",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "many-to-many",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 102,
|
||||
"title": "Knowledge Representation and Expert Systems: Pre-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "The top-down approach to creating intelligent systems was based on:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "knowledge seeking and reading",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "knowledge representation and reasoning",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "knowledge reasoning and seeking",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Knowledge is the same as information",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Knowledge is obtained by an:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "active learning process",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "passive learning process",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both of these",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 202,
|
||||
"title": "Knowledge Representation and Expert Systems: Post-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "The simplest method of knowledge representation is:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "algorithmic",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "symbolic",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "synergistic",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Scenarios can represent complex situations that can unfold in time",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Forward inference starts with initial data and then:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "executes a reasoning loop",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "looks for a goal",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "starts over",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 120,
|
||||
"title": "Language Models: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "What does GPT stand for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Generic Pre-Trained network",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Generative Pre-trained Transformers",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Generic Positional Text",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "What can GPT be used for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Text generation",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Text classification",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Both text generation and other tasks",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "GPT is based on transformer architecture",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 220,
|
||||
"title": "Language Models: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "What is zero-shot learning?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Getting an answer from pre-trained network",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Training the network from scratch",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Training the network only for one epoch",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Prompt engineering can be used with",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Zero-shot learning",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Few-shot learning",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Both",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which metric can be used to estimate the quality of a language model?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "accuracy",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "recall",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "perplexity",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 121,
|
||||
"title": "Genetic Algorithms: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Genetic Algorithms are based on which of the following?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "mutations",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Selection",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both a and b",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Crossover allows us to combine two solutions together to obtain a new valid solution",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Valid solutions to genetic algorithm can be represented as _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "genes",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "neurons",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "cells",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 221,
|
||||
"title": "Genetic Algorithms: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Genetic Algorithms can solve which of these tasks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Schedule optimization",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Optimal packing",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both of a and b",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "In implementing a genetic algorithm the first step is to randomly select two genes",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "When using Crossover operation the algorithm randomly selects _____ genes",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "3",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "1",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "2",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,123 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 122,
|
||||
"title": "Reinforcement Learning: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "To train RL model, we need",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Simulation environment",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Labeled dataset",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Unlabeled dataset",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "What is a good example of Reinforcement learning:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Zero-shot image classification",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Zero-shot text classification",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Learning to play chess",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "When creating RL-based chess engine, we need to",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "use all existing chess matches as a dataset",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "let computer play against itself many times",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "program exhaustive search algorithm",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 222,
|
||||
"title": "Reinforcement Learning: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "How does RL training algorithm knows how well it did?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "It achieves high accuracy",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Using perplexity metric",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Using reward function",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which problem(s) is RL is applicable to?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "With discrete environment",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "With continuous environment",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Both",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "In Actor-Critic model, critic predicts",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Reward function",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Best next action",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Probability of next actions",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 123,
|
||||
"title": "Multi-Agent Modeling: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "By modeling the behavior of simple agents, we can understand more complex behaviors of a system.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The principle of metasystem transition is derived from:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Evolutionary Cybernetics",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Emergentism",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both of these",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Multi-Agent systems emerged in the ____:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1970s",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "1980s",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "1990s",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 223,
|
||||
"title": "Multi-Agent Modeling: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "An agent is:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "an entity that lives alone",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "an entity that lives in an environment",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "an entity that is intelligent",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Reactive agents usually have:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "simple request-response behavior",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "complex behavior",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "no behavior",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Multi-agent systems are used in:",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "video production and systems modeling",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "games and automations",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "both the above",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,136 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 124,
|
||||
"title": "Ethical and Responsible AI: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Why we need to worry about Ethical AI?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "AI is a very powerful tool and can cause harm",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "We need to make sure AI models do not discriminate people",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Both",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which is the example of interpretable AI?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Expert system",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Neural network",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Image classifier",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "It is not ethical to use AI in medicine",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 224,
|
||||
"title": "Ethical and Responsible AI: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Why an AI model can discriminate?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Because it may become unfriendly",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Because datasets were not properly balanced",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Because developers programmed it in such a way",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Which of the following is not a principle of Responsible AI?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Transparency",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Fairness",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Cleverness",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Accountability of an AI system means that",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "there should be a human being involved in taking decisions, who can take responsibility",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "AI system should be held responsible for its actions",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "AI system developers should be held responsible",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Model fairness is related to",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Interpretability",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Biases",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Accountability",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 103,
|
||||
"title": "Introduction to Neural Networks - Perceptron: Pre-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Early neural networks required",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "manual weight adjusting",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "terabytes of data",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "special reasoning",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A simple neuron is also called a 'threshold logic unit'",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A perceptron is a ___ type of model",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "multi-class classification",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "clustering",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "binary classification",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 203,
|
||||
"title": "Introduction to Neural Networks - Perceptron: Post-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "To train a perceptron, find a weights vector that results in the smallest ___.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "size",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "error",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "nodes",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "To minimize the function of weights, you can use gradient descent",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "During gradient descent, each step updates the ___",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "learning rate",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "weights",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "gradient",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 104,
|
||||
"title": "Neural Networks: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "The quality of prediction is measured by Loss function",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "One layer network is capable of classifying ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "linearly joined classes",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "linearly separable classes",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "single layers of classes",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The method of training multi-layered perceptron is called ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "back propagation",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "multiple propagation",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "front propagation",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 204,
|
||||
"title": "Neural Networks: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "We use ____ for regression loss functions",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "absolute error",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "mean squared error",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "all of the above",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "All but one is a type of classification loss function",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "0-1 loss",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "binary loss",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "logistic loss",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Cross-entropy loss is a function that can calculate similarity between two arbitrary probability distributions",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 105,
|
||||
"title": "Frameworks: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Deep Neural Network training requires a lot of computations",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Overfitting occurs because of ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Not enough testing data",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Too powerful model",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Too much noise in output data",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Bias errors are caused by our ____ not being able to capture the relationship between training data correctly.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "model",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "algorithm",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "computer",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 205,
|
||||
"title": "Frameworks: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "After compiling our model object, we train by calling ____ function",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "fit",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "train",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "teach",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Binary cross-entropy is also called log loss",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "TensorFlow is to ____ while PyTorch is to ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Facebook, Google",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Google, Facebook",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Microsoft, Google",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 106,
|
||||
"title": "Introduction to Computer Vision: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Computer vision aims to allow computers gain understanding of _____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "images",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "text",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "computers",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Python libraries available for image processing includes",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "OpenCV",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Pillow",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "a and b",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Images cannot be represented as NumPy arrays in Python",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 206,
|
||||
"title": "Introduction to Computer Vision: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Optical Flow helps us to understand how each pixel on video frames move.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "_____ computes the vector field that shows where each pixel is moving",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Sparse Optical Flow",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Dense Optical Flow",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "none",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Resizing and Blurring are steps that can be taken during?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "pre-processing",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "training",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "image transformation",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,111 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 107,
|
||||
"title": "Convolutional Neural Networks: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "To extract patterns from images we use?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "convolutional filters",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "extractor",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "filters",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "One of these is not a CNN Architecture",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "ResNet",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "MobileNet",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "TensorFlow",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "CNN are mostly used for computer vision tasks.",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 207,
|
||||
"title": "Convolutional Neural Networks: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Which pooling layer is used \"scale down\" the size of the image",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "average pooling",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "max pooling",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "a and b",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Convolutional networks generalizes much better",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "To train our neural network, we need to convert images to tensors",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 108,
|
||||
"title": "Pre-trained Networks and Transfer Learning: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Transfer learning approach uses untrained models for classification",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "One of these is not a normalization technique?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "height normalization",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "weight normalization",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "layer normalization",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "We choose Stochastic Gradient Descent(SGD) in deep learning because classical gradient descent can be ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "fast",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "slow",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 208,
|
||||
"title": "Pre-trained Networks and Transfer Learning: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Dropout layers act as a ____ technique",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "gradient boosting",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "training",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "regularization",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "freezing weights of convolutional feature extractor can be done by ____",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "setting `requires_grad` property to `False`",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "setting `trainable` property to `False`",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "a and b",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Batch normalization is to bring values that flow through the ____ to right interval",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "algorithms",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "batches",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "neural network",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 109,
|
||||
"title": "Autoencoders: Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Self-supervised learning uses ____ data for training",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "pre-trained",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "raw",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "labeled",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Encoder Network coverts input images into latent spaces",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "VAE is short for?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Variable AutoEncoding",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "Variation auto-encoder",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "Variational automated encoders",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 209,
|
||||
"title": "Autoencoders: Post Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "Properties of autoencoders include",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "it is data Specific",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "works on unlabeled data",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "all of the above",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Auto encoders can be used to effectively remove noise from images",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": true
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Variational auto-encoders loss function does not consist of which of these?",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "reconstruction loss",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "KL loss",
|
||||
"isCorrect": false
|
||||
},
|
||||
{
|
||||
"answerText": "TF loss",
|
||||
"isCorrect": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
import es1 from './lesson-1.json';
|
||||
//add items here
|
||||
const quiz = {
|
||||
0: es1[0]
|
||||
};
|
||||
|
||||
export default quiz;
|
||||
@@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"title": "IA para principiantes: Quizzes",
|
||||
"complete": "¡Felicitaciones, has completado el cuestionario!",
|
||||
"error": "Perdón, intente de nuevo",
|
||||
"quizzes": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "Introducción a la IA - Pre Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "A famous 19th century proto-computer engineer was",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "Charles Barkley",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "Charles Babbage",
|
||||
"isCorrect": "true"
|
||||
},
|
||||
{
|
||||
"answerText": "Charles Darwin",
|
||||
"isCorrect": "false"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Weak AI is a system designed to solve many tasks",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "True",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "False",
|
||||
"isCorrect": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "Chat bots are an example of truly intelligent systems",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "false, they are usually designed by a series of rules.",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "true, they are usually considered to be 'intelligent'.",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "false, but they are increasingly able to pass Turing tests as they become more sophisticated.",
|
||||
"isCorrect": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Introducción a la IA: Post-Quiz",
|
||||
"quiz": [
|
||||
{
|
||||
"questionText": "A top-down approach to AI is a model of reasoning called",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "strategic reasoning",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "symbolic reasoning",
|
||||
"isCorrect": "true"
|
||||
},
|
||||
{
|
||||
"answerText": "synergistic reasoning",
|
||||
"isCorrect": "false"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "A bottom-up approach to AI might leverage a neural network to",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "true",
|
||||
"isCorrect": "true"
|
||||
},
|
||||
{
|
||||
"answerText": "false",
|
||||
"isCorrect": "false"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"questionText": "The AI Winter occurred in this era",
|
||||
"answerOptions": [
|
||||
{
|
||||
"answerText": "1950s",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "1960s",
|
||||
"isCorrect": "false"
|
||||
},
|
||||
{
|
||||
"answerText": "1970s",
|
||||
"isCorrect": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
import englishQuizzes from './en';
|
||||
import spanishQuizzes from './es';
|
||||
|
||||
const messages = {
|
||||
en: englishQuizzes,
|
||||
es: spanishQuizzes,
|
||||
};
|
||||
export default messages;
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div v-for="q in questions[currLocale]" :key="q.quizzes[0].id">
|
||||
<div v-for="quiz in q.quizzes" :key="quiz.id">
|
||||
|
||||
<div v-if="route == quiz.id">
|
||||
<div>
|
||||
<h3 v-if="complete" class="message complete">{{ q.complete }}</h3>
|
||||
<div v-else>
|
||||
<h3 v-if="error" class="error">{{ q.error }}</h3>
|
||||
</div>
|
||||
|
||||
<h1>{{quiz.title}}</h1>
|
||||
|
||||
|
||||
<h2>
|
||||
{{ quiz.quiz[currentQuestion].questionText }}
|
||||
</h2>
|
||||
<div>
|
||||
<button
|
||||
:key="index"
|
||||
v-for="(option, index) in quiz.quiz[currentQuestion]
|
||||
.answerOptions"
|
||||
@click="handleAnswerClick(option.isCorrect)"
|
||||
class="btn ans-btn"
|
||||
>
|
||||
{{ option.answerText }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import messages from "@/assets/translations";
|
||||
|
||||
export default {
|
||||
name: "Quiz",
|
||||
data() {
|
||||
return {
|
||||
currentQuestion: 0,
|
||||
complete: false,
|
||||
error: false,
|
||||
route: "",
|
||||
locale: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
questions() {
|
||||
return messages;
|
||||
},
|
||||
currLocale() {
|
||||
return this.$root.$i18n.locale;
|
||||
}
|
||||
},
|
||||
|
||||
i18n: {
|
||||
messages,
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleAnswerClick(isCorrect) {
|
||||
this.error = false;
|
||||
let nextQuestion = this.currentQuestion + 1;
|
||||
if (isCorrect) {
|
||||
//always 3 questions per quiz
|
||||
if (nextQuestion < 3) {
|
||||
this.currentQuestion = nextQuestion;
|
||||
} else {
|
||||
this.complete = true;
|
||||
}
|
||||
} else {
|
||||
this.error = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.route = this.$route.params.id;
|
||||
if (this.$route.query.loc) {
|
||||
this.locale = this.$route.query.loc;
|
||||
} else {
|
||||
this.locale = "en";
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,14 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
Vue.config.productionTip = false;
|
||||
import router from './router';
|
||||
|
||||
import VueI18n from 'vue-i18n';
|
||||
Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: 'en',
|
||||
fallbackLocale: 'en',
|
||||
});
|
||||
|
||||
new Vue({ i18n, router, render: (h) => h(App) }).$mount('#app');
|
||||
@@ -0,0 +1,34 @@
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import Home from '@/views/Home.vue';
|
||||
import Quiz from '@/components/Quiz.vue';
|
||||
import NotFound from '@/views/NotFound.vue';
|
||||
Vue.use(Router);
|
||||
|
||||
const router = new Router({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Home,
|
||||
},
|
||||
{
|
||||
path: '/quiz/:id',
|
||||
name: 'Quiz',
|
||||
component: Quiz,
|
||||
},
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'NotFound',
|
||||
component: NotFound,
|
||||
meta: { title: 'Not Found' },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
});
|
||||
export default router;
|
||||
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-for="q in questions[currLocale]" :key="q.id">
|
||||
|
||||
<router-link
|
||||
v-for="quiz in q.quizzes"
|
||||
:key="quiz.id"
|
||||
:to="`quiz/${quiz.id}`"
|
||||
class="link"
|
||||
>
|
||||
{{ quiz.title }}
|
||||
</router-link>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import messages from "@/assets/translations";
|
||||
|
||||
export default {
|
||||
name: "Home",
|
||||
data() {
|
||||
return {
|
||||
locale: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
questions() {
|
||||
return messages;
|
||||
},
|
||||
currLocale() {
|
||||
return this.$root.$i18n.locale;
|
||||
}
|
||||
},
|
||||
i18n: { messages },
|
||||
watch: {
|
||||
locale(val) {
|
||||
this.$root.$i18n.locale = val;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.route = this.$route.params.id;
|
||||
if (this.$route.query.loc) {
|
||||
this.locale = this.$route.query.loc;
|
||||
} else {
|
||||
this.locale = "en";
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<p>Sorry, wrong number!</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,639 @@
|
||||
Lesson 1B Introduction to AI: Pre Quiz
|
||||
* A famous 19th century proto-computer engineer was
|
||||
- Charles Barkley
|
||||
+ Charles Babbage
|
||||
- Charles Darwin
|
||||
* Weak AI is a system designed to solve many tasks
|
||||
- True
|
||||
+ False
|
||||
* Chat bots are an example of truly intelligent systems
|
||||
- false, they are usually designed by a series of rules.
|
||||
- true, they are usually considered to be 'intelligent
|
||||
+ false, but they are increasingly able to pass Turing tests as they become more sophisticated.
|
||||
|
||||
Lesson 1E Introduction to AI: Post-Quiz
|
||||
* A top-down approach to AI is a model of reasoning called
|
||||
- strategic reasoning
|
||||
+ symbolic reasoning
|
||||
- synergistic reasoning
|
||||
* A bottom-up approach to AI is based on neural networks
|
||||
+ True
|
||||
- False
|
||||
* The AI Winter occurred in this era
|
||||
- 1950s
|
||||
- 1960s
|
||||
+ 1970s
|
||||
|
||||
Lesson 2B Knowledge Representation and Expert Systems: Pre-Quiz
|
||||
* The top-down approach to creating intelligent systems was based on:
|
||||
- knowledge seeking and reading
|
||||
+ knowledge representation and reasoning
|
||||
- knowledge reasoning and seeking
|
||||
* Knowledge is the same as information
|
||||
- True
|
||||
+ False
|
||||
* Knowledge is obtained by an:
|
||||
+ active learning process
|
||||
- passive learning process
|
||||
- both of these
|
||||
|
||||
Lesson 2E Knowledge Representation and Expert Systems: Post-Quiz
|
||||
* The simplest method of knowledge representation is:
|
||||
+ algorithmic
|
||||
- symbolic
|
||||
- synergistic
|
||||
* Scenarios can represent complex situations that can unfold in time
|
||||
+ true
|
||||
- false
|
||||
* Forward inference starts with initial data and then:
|
||||
+ executes a reasoning loop
|
||||
- looks for a goal
|
||||
- starts over
|
||||
|
||||
Lesson 3B Introduction to Neural Networks - Perceptron: Pre-Quiz
|
||||
* Early neural networks required
|
||||
+ manual weight adjusting
|
||||
- terabytes of data
|
||||
- special reasoning
|
||||
* A simple neuron is also called a 'threshold logic unit'
|
||||
+ true
|
||||
- false
|
||||
* A perceptron is a ___ type of model
|
||||
- multi-class classification
|
||||
- clustering
|
||||
+ binary classification
|
||||
|
||||
Lesson 3E Introduction to Neural Networks - Perceptron: Post-Quiz
|
||||
* To train a perceptron, find a weights vector that results in the smallest ___.
|
||||
- size
|
||||
+ error
|
||||
- nodes
|
||||
* To minimize the function of weights, you can use gradient descent
|
||||
+ true
|
||||
- false
|
||||
* During gradient descent, each step updates the ___
|
||||
- learning rate
|
||||
+ weights
|
||||
- gradient
|
||||
|
||||
Lesson 4B Neural Networks: Pre Quiz
|
||||
* The quality of prediction is measured by Loss function
|
||||
+ True
|
||||
- False
|
||||
* One layer network is capable of classifying ____
|
||||
- linearly joined classes
|
||||
+ linearly separable classes
|
||||
- single layers of classes
|
||||
* The method of training multi-layered perceptron is called ____
|
||||
+ back propagation
|
||||
- multiple propagation
|
||||
- front propagation
|
||||
|
||||
Lesson 4E Neural Networks: Post Quiz
|
||||
* We use ____ for regression loss functions
|
||||
- absolute error
|
||||
- mean squared error
|
||||
+ all of the above
|
||||
* All but one is a type of classification loss function
|
||||
- 0-1 loss
|
||||
+ binary loss
|
||||
- logistic loss
|
||||
* Cross-entropy loss is a function that can calculate similarity between two arbitrary probability distributions
|
||||
+ True
|
||||
- False
|
||||
|
||||
Lesson 5B Frameworks: Pre Quiz
|
||||
* Deep Neural Network training requires a lot of computations
|
||||
+ True
|
||||
- False
|
||||
* Overfitting occurs because of ____
|
||||
- Not enough testing data
|
||||
+ Too powerful model
|
||||
- Too much noise in output data
|
||||
* Bias errors are caused by our ____ not being able to capture the relationship between training data correctly.
|
||||
- model
|
||||
+ algorithm
|
||||
- computer
|
||||
|
||||
Lesson 5E Frameworks: Post Quiz
|
||||
* After compiling our model object, we train by calling ____ function
|
||||
+ fit
|
||||
- train
|
||||
- teach
|
||||
* Binary cross-entropy is also called log loss
|
||||
+ True
|
||||
- False
|
||||
* TensorFlow is to ____ while PyTorch is to ____
|
||||
- Facebook, Google
|
||||
+ Google, Facebook
|
||||
- Microsoft, Google
|
||||
|
||||
Lesson 6B Introduction to Computer Vision: Pre Quiz
|
||||
* Computer vision aims to allow computers gain understanding of _____
|
||||
+ images
|
||||
- text
|
||||
- computers
|
||||
* Python libraries available for image processing includes
|
||||
- OpenCV
|
||||
- Pillow
|
||||
+ a and b
|
||||
* Images cannot be represented as NumPy arrays in Python
|
||||
- true
|
||||
+ False
|
||||
|
||||
Lesson 6E Introduction to Computer Vision: Post Quiz
|
||||
* Optical Flow helps us to understand how each pixel on video frames move.
|
||||
+ true
|
||||
- false
|
||||
* _____ computes the vector field that shows where each pixel is moving
|
||||
- Sparse Optical Flow
|
||||
+ Dense Optical Flow
|
||||
- none
|
||||
* Resizing and Blurring are steps that can be taken during?
|
||||
+ pre-processing
|
||||
- training
|
||||
- image transformation
|
||||
|
||||
Lesson 7B Convolutional Neural Networks: Pre Quiz
|
||||
* To extract patterns from images we use?
|
||||
+ convolutional filters
|
||||
- extractor
|
||||
- filters
|
||||
* One of these is not a CNN Architecture
|
||||
- ResNet
|
||||
- MobileNet
|
||||
+ TensorFlow
|
||||
* CNN are mostly used for computer vision tasks.
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 7E Convolutional Neural Networks: Post Quiz
|
||||
* Which pooling layer is used "scale down" the size of the image
|
||||
- average pooling
|
||||
- max pooling
|
||||
+ a and b
|
||||
* Convolutional networks generalizes much better
|
||||
+ True
|
||||
- False
|
||||
* To train our neural network, we need to convert images to tensors
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 8B Pre-trained Networks and Transfer Learning: Pre Quiz
|
||||
* Transfer learning approach uses untrained models for classification
|
||||
- true
|
||||
+ false
|
||||
* One of these is not a normalization technique?
|
||||
+ height normalization
|
||||
- weight normalization
|
||||
- layer normalization
|
||||
* We choose Stochastic Gradient Descent(SGD) in deep learning because classical gradient descent can be ____
|
||||
- fast
|
||||
+ slow
|
||||
|
||||
Lesson 8E Pre-trained Networks and Transfer Learning: Post Quiz
|
||||
* Dropout layers act as a ____ technique
|
||||
- gradient boosting
|
||||
- training
|
||||
+ regularization
|
||||
* freezing weights of convolutional feature extractor can be done by ____
|
||||
- setting `requires_grad` property to `False`
|
||||
- setting `trainable` property to `False`
|
||||
+ a and b
|
||||
* Batch normalization is to bring values that flow through the ____ to right interval
|
||||
- algorithms
|
||||
- batches
|
||||
+ neural network
|
||||
|
||||
Lesson 9B Autoencoders: Pre Quiz
|
||||
* Self-supervised learning uses ____ data for training
|
||||
- pre-trained
|
||||
+ raw
|
||||
- labeled
|
||||
* Encoder Network coverts input images into latent spaces
|
||||
+ true
|
||||
- false
|
||||
* VAE is short for?
|
||||
- Variable AutoEncoding
|
||||
+ Variation auto-encoder
|
||||
- Variational automated encoders
|
||||
|
||||
Lesson 9E Autoencoders: Post Quiz
|
||||
* Properties of autoencoders include
|
||||
- it is data Specific
|
||||
- works on unlabeled data
|
||||
+ all of the above
|
||||
* Auto encoders can be used to effectively remove noise from images
|
||||
+ true
|
||||
- false
|
||||
* Variational auto-encoders loss function does not consist of which of these?
|
||||
- reconstruction loss
|
||||
- KL loss
|
||||
+ TF loss
|
||||
|
||||
Lesson 10B Generative Adversarial Networks: Pre Quiz
|
||||
* Generators take vectors and produce ____
|
||||
- videos
|
||||
+ image
|
||||
- gif
|
||||
* GANs is short for?
|
||||
- General adversarial networks
|
||||
- Generative advisor networks
|
||||
+ Generative adversarial networks
|
||||
* GAN uses ____ neural networks
|
||||
- 1
|
||||
+ 2
|
||||
- 3
|
||||
|
||||
Lesson 10E Generative Adversarial Networks: Post Quiz
|
||||
* We can use Batch normalization and BatchNorm1D to stabilize the training
|
||||
+ true
|
||||
- false
|
||||
* Deep Convolutional GAN uses convolutional layers for ____ and ____
|
||||
+ generator, discriminator
|
||||
- CNN, generator
|
||||
- training, testing
|
||||
* Problems of GAN training includes
|
||||
- Sensitivity to hyperparameters
|
||||
- Keeping balance between generator and discriminator
|
||||
+ all of the above
|
||||
|
||||
Lesson 11B Object Detection: Pre Quiz
|
||||
* Neural networks can only be used to classify images
|
||||
- true
|
||||
+ false
|
||||
* With object detection, we don't just get the class of an object, but also its ____
|
||||
- shape
|
||||
+ location
|
||||
- type
|
||||
* How many objects can an object detection model detect?
|
||||
- one
|
||||
- two
|
||||
+ any number
|
||||
|
||||
Lesson 11E Object Detection: Post Quiz
|
||||
* An Object detection model gives us
|
||||
- object class
|
||||
- bounding box
|
||||
+ both class and bounding box
|
||||
* Which object detection models are faster?
|
||||
+ one-pass models
|
||||
- region proposal networks
|
||||
- Fast R-CNN
|
||||
* Which metric can be used to determine how well bounding boxes are aligned?
|
||||
- accuracy
|
||||
- precision
|
||||
+ IoU
|
||||
|
||||
Lesson 12B Segmentation: Pre Quiz
|
||||
* How many segmentation algorithm are there?
|
||||
- 1
|
||||
+ 2
|
||||
- 3
|
||||
* Segmentation is a _____ task
|
||||
+ computer vision
|
||||
- natural language processing
|
||||
- neural networks
|
||||
* Segmentation networks consist of ____ and ____ parts
|
||||
- classifier, divider
|
||||
+ encoder, decoder
|
||||
- generator, discriminator
|
||||
|
||||
Lesson 12E Segmentation: Post Quiz
|
||||
* ____ extracts features from an input image
|
||||
- decoder
|
||||
- generator
|
||||
+ encoder
|
||||
* ____ transforms input features into mask image
|
||||
+ decoder
|
||||
- generator
|
||||
- encoder
|
||||
* SegNet relies on ____ to train multi-layered network
|
||||
+ batch normalization
|
||||
- height normalization
|
||||
- weight normalization
|
||||
|
||||
Lesson 13B Text Representation: Pre Quiz
|
||||
* Each word in a Bag of Words is linked to a vector index
|
||||
+ true
|
||||
- false
|
||||
* Text can be represented using _____ approaches
|
||||
- 1
|
||||
+ 2
|
||||
- 3
|
||||
* Character level representation represents each _____ as a number
|
||||
+ letter
|
||||
- word
|
||||
- symbol
|
||||
|
||||
Lesson 13E Text Representation: Post Quiz
|
||||
* Word level representation represents _____ as a number
|
||||
- letter
|
||||
+ word
|
||||
- symbol
|
||||
* N-Grams refers to _____
|
||||
- combination of n number of words and symbols
|
||||
- combination of n number of letters
|
||||
+ combination of n number of Words
|
||||
* The main drawback of N-gram is that the vocabulary size grows fast
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 14B Embeddings: Pre Quiz
|
||||
* Embedding is used to represent words with _____ dimensional dense vectors
|
||||
+ lower
|
||||
- higher
|
||||
- average
|
||||
* Word2Vec pre-trained embeddings can also be used in place of embedding layer in neural networks
|
||||
+ True
|
||||
- False
|
||||
* Using embedding layer we cannot switch from bag-of-words to embedding bag
|
||||
- True
|
||||
+ false
|
||||
|
||||
Lesson 14E Embeddings: Post Quiz
|
||||
* Word2Vec has _____ main architectures
|
||||
- 1
|
||||
+ 2
|
||||
- 3
|
||||
* Word sense disambiguation is a limitation of traditional pretrained embedding representations
|
||||
+ True
|
||||
- False
|
||||
* An embedding layer takes _____ as input
|
||||
+ word
|
||||
- symbol
|
||||
- number
|
||||
|
||||
Lesson 15B Language Modeling: Pre Quiz
|
||||
* Which of the following can be considered a language model?
|
||||
+ Word2Vec embeddings
|
||||
- Embedding layer in RNN
|
||||
- RNN used for text classification
|
||||
* A language model should be able to ____ the next word in the sentence
|
||||
- use
|
||||
+ predict
|
||||
- guess
|
||||
* Language models are trained on
|
||||
- language vocabulary
|
||||
- specially labeled data
|
||||
+ any natural text
|
||||
|
||||
Lesson 15E Language Modeling: Post Quiz
|
||||
* Which of the architectures predicts a word from neighboring words?
|
||||
+ CBoW
|
||||
- Skip-gram
|
||||
- N-Gram
|
||||
* When we train a CBoW model, we obtain
|
||||
- A model that can generate text
|
||||
+ Word2Vec embedding vectors
|
||||
- Text classification model
|
||||
* The CBoW model is based on
|
||||
+ Dense neural network
|
||||
- Convolutional neural network
|
||||
- Recurrent neural network
|
||||
|
||||
Lesson 16B RNN: Pre Quiz
|
||||
* RNN is short for?
|
||||
- regression neural network
|
||||
+ recurrent neural network
|
||||
- re-iterative neural network
|
||||
* A simple RNN cell has two weight _____
|
||||
+ matrices
|
||||
- cell
|
||||
- neuron
|
||||
* vanishing gradients is a problem of _____
|
||||
+ RNN
|
||||
- CNN
|
||||
- KNN
|
||||
|
||||
Lesson 16E RNN: Post Quiz
|
||||
* _____ takes some information from the input and hidden vector, and inserts it into state
|
||||
- forget gate
|
||||
- output gate
|
||||
+ input gate
|
||||
* Bidirectional RNNs runs recurrent computation in _____
|
||||
+ both directions
|
||||
- north-west direction
|
||||
- left-right direction
|
||||
* All RNN Cells have the same shareable weights
|
||||
+ True
|
||||
- False
|
||||
|
||||
Lesson 17B Generative networks: Pre Quiz
|
||||
* RNNs can be for generative tasks
|
||||
+ yes
|
||||
- no
|
||||
* _____ is a traditional neural network with one input and one output
|
||||
+ one-to-one
|
||||
- sequence-to-sequence
|
||||
- one-to-many
|
||||
* RNN generates texts by generating next output token for each input token
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 17E Generative networks: Post Quiz
|
||||
* Output encoder converts hidden state into _____ output
|
||||
+ one-hot-encoded
|
||||
- sequence
|
||||
- number
|
||||
* Selecting the character with higher probabilities always gives a meaningful text.
|
||||
- true
|
||||
+ false
|
||||
- maybe
|
||||
* Many-to-many can also be referred to as _____
|
||||
- one-to-one
|
||||
+ sequence-to-sequence
|
||||
- one-to-many
|
||||
|
||||
Lesson 18B Transformers: Pre Quiz
|
||||
* Attention mechanism provides a means of _____ the impact of an inout vector on an output prediction of RNN
|
||||
+ weighting
|
||||
- training
|
||||
- testing
|
||||
* BERT is an acronym for
|
||||
- Bidirectional Encoded Representations From Transformers
|
||||
+ Bidirectional Encoder Representations From Transformers
|
||||
- Bidirectional Encoder Representatives of Transformers
|
||||
* In positional encoding the relative position of the token is represented by number of steps
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 18E Transformers: Post Quiz
|
||||
* Positional embedding _____ the original token and its position within the sequence
|
||||
- separates
|
||||
- compares
|
||||
+ embeds
|
||||
* Multi-Head Attention is used in transformers to give network the power to capture _____ of dependencies
|
||||
+ different types
|
||||
- same type
|
||||
- none
|
||||
* In transformers attention is used in _____ instances
|
||||
- 1
|
||||
+ 2
|
||||
- 3
|
||||
|
||||
Lesson 19B Named Entity Recognition: Pre Quiz
|
||||
* What does NER stands for?
|
||||
- Nearest Estimated Region
|
||||
- Nearest Entity Region
|
||||
+ Named Entity Recognition
|
||||
* An entity always consists of one token
|
||||
- true
|
||||
+ false
|
||||
* To train NER model, we need
|
||||
+ Labeled dataset
|
||||
- Any natural text
|
||||
- Translated texts in two languages
|
||||
|
||||
Lesson 19E Named Entity Recognition: Post Quiz
|
||||
* NER model is essentially a ____ model
|
||||
- text classification
|
||||
+ token classification
|
||||
- text regression
|
||||
* Which neural network types can be used for NER?
|
||||
- RNNs
|
||||
- Transformers
|
||||
+ Both RNNs and Transformers
|
||||
* NER model is a good example of ____ network architecture
|
||||
- one-to-one
|
||||
- one-to-many
|
||||
+ many-to-many
|
||||
|
||||
Lesson 20B Language Models: Pre Quiz
|
||||
* What does GPT stand for?
|
||||
- Generic Pre-Trained network
|
||||
+ Generative Pre-trained Transformers
|
||||
- Generic Positional Text
|
||||
* What can GPT be used for?
|
||||
- Text generation
|
||||
- Text classification
|
||||
+ Both text generation and other tasks
|
||||
* GPT is based on transformer architecture
|
||||
+ true
|
||||
- false
|
||||
|
||||
Lesson 20E Language Models: Post Quiz
|
||||
* What is zero-shot learning?
|
||||
+ Getting an answer from pre-trained network
|
||||
- Training the network from scratch
|
||||
- Training the network only for one epoch
|
||||
* Prompt engineering can be used with
|
||||
- Zero-shot learning
|
||||
- Few-shot learning
|
||||
+ Both
|
||||
* Which metric can be used to estimate the quality of a language model?
|
||||
- accuracy
|
||||
- recall
|
||||
+ perplexity
|
||||
|
||||
Lesson 21B Genetic Algorithms: Pre Quiz
|
||||
* Genetic Algorithms are based on which of the following?
|
||||
- mutations
|
||||
- Selection
|
||||
+ both a and b
|
||||
* Crossover allows us to combine two solutions together to obtain a new valid solution
|
||||
+ true
|
||||
- false
|
||||
* Valid solutions to genetic algorithm can be represented as _____
|
||||
+ genes
|
||||
- neurons
|
||||
- cells
|
||||
|
||||
Lesson 21E Genetic Algorithms: Post Quiz
|
||||
* Genetic Algorithms can solve which of these tasks
|
||||
- Schedule optimization
|
||||
- Optimal packing
|
||||
+ both of a and b
|
||||
* In implementing a genetic algorithm the first step is to randomly select two genes
|
||||
- true
|
||||
+ false
|
||||
* When using Crossover operation the algorithm randomly selects _____ genes
|
||||
- 3
|
||||
- 1
|
||||
+ 2
|
||||
|
||||
Lesson 22B Reinforcement Learning: Pre Quiz
|
||||
* To train RL model, we need
|
||||
+ Simulation environment
|
||||
- Labeled dataset
|
||||
- Unlabeled dataset
|
||||
* What is a good example of Reinforcement learning:
|
||||
- Zero-shot image classification
|
||||
- Zero-shot text classification
|
||||
+ Learning to play chess
|
||||
* When creating RL-based chess engine, we need to
|
||||
- use all existing chess matches as a dataset
|
||||
+ let computer play against itself many times
|
||||
- program exhaustive search algorithm
|
||||
|
||||
Lesson 22E Reinforcement Learning: Post Quiz
|
||||
* How does RL training algorithm knows how well it did?
|
||||
- It achieves high accuracy
|
||||
- Using perplexity metric
|
||||
+ Using reward function
|
||||
* Which problem(s) is RL is applicable to?
|
||||
- With discrete environment
|
||||
- With continuous environment
|
||||
+ Both
|
||||
* In Actor-Critic model, critic predicts
|
||||
+ Reward function
|
||||
- Best next action
|
||||
- Probability of next actions
|
||||
|
||||
Lesson 23B Multi-Agent Modeling: Pre Quiz
|
||||
* By modeling the behavior of simple agents, we can understand more complex behaviors of a system.
|
||||
+ true
|
||||
- false
|
||||
* The principle of metasystem transition is derived from:
|
||||
- Evolutionary Cybernetics
|
||||
- Emergentism
|
||||
+ both of these
|
||||
* Multi-Agent systems emerged in the ____:
|
||||
- 1970s
|
||||
- 1980s
|
||||
+ 1990s
|
||||
|
||||
Lesson 23E Multi-Agent Modeling: Post Quiz
|
||||
* An agent is:
|
||||
- an entity that lives alone
|
||||
+ an entity that lives in an environment
|
||||
- an entity that is intelligent
|
||||
* Reactive agents usually have:
|
||||
+ simple request-response behavior
|
||||
- complex behavior
|
||||
- no behavior
|
||||
* Multi-agent systems are used in:
|
||||
- video production and systems modeling
|
||||
- games and automations
|
||||
+ both the above
|
||||
|
||||
Lesson 24B Ethical and Responsible AI: Pre Quiz
|
||||
* Why we need to worry about Ethical AI?
|
||||
- AI is a very powerful tool and can cause harm
|
||||
- We need to make sure AI models do not discriminate people
|
||||
+ Both
|
||||
* Which is the example of interpretable AI?
|
||||
+ Expert system
|
||||
- Neural network
|
||||
- Image classifier
|
||||
* It is not ethical to use AI in medicine
|
||||
- true
|
||||
+ false
|
||||
|
||||
Lesson 24E Ethical and Responsible AI: Post Quiz
|
||||
* Why an AI model can discriminate?
|
||||
- Because it may become unfriendly
|
||||
+ Because datasets were not properly balanced
|
||||
- Because developers programmed it in such a way
|
||||
* Which of the following is not a principle of Responsible AI?
|
||||
- Transparency
|
||||
- Fairness
|
||||
+ Cleverness
|
||||
* Accountability of an AI system means that
|
||||
+ there should be a human being involved in taking decisions, who can take responsibility
|
||||
- AI system should be held responsible for its actions
|
||||
- AI system developers should be held responsible
|
||||
* Model fairness is related to
|
||||
- Interpretability
|
||||
+ Biases
|
||||
- Accountability
|
||||
@@ -0,0 +1,62 @@
|
||||
src = 'questions-en.txt'
|
||||
dst_dir = '../quiz-app/src/assets/translations/en'
|
||||
|
||||
import json,os
|
||||
from copy import deepcopy
|
||||
|
||||
from matplotlib.cbook import ls_mapper
|
||||
|
||||
def mk_id(s): # convert from 4B/4E to numeric lesson id
|
||||
lesson_no = int(s[:-1])
|
||||
return lesson_no + (100 if s[-1]=='B' else 200)
|
||||
|
||||
with open('template.json') as f:
|
||||
doc = json.load(f)
|
||||
|
||||
inp = open(src,encoding='utf-8').readlines()
|
||||
|
||||
prev_q = None
|
||||
prev_l = None
|
||||
prev_l_id = None
|
||||
lessons = { }
|
||||
|
||||
for l in inp:
|
||||
l = l.strip()
|
||||
if l=='': continue
|
||||
if l.startswith('+') or l.startswith('-'): # answer
|
||||
prev_q['answerOptions'].append({ "answerText" : l[2:], "isCorrect" : l.startswith('+') })
|
||||
elif l.startswith('*'):
|
||||
if prev_q:
|
||||
prev_l['quiz'].append(prev_q)
|
||||
prev_q = { "questionText" : l[2:], "answerOptions" : [] };
|
||||
elif l.startswith('Lesson'):
|
||||
if prev_q:
|
||||
prev_l['quiz'].append(prev_q)
|
||||
prev_q = None
|
||||
if prev_l is not None:
|
||||
lessons[prev_l_id] = prev_l
|
||||
prev_l_id = l[7:l.find(' ',7)]
|
||||
prev_l = { "id" : mk_id(prev_l_id), "title" : l[l.find(' ',7)+1:], "quiz" : [] }
|
||||
else:
|
||||
print(f"Error: {l}")
|
||||
|
||||
prev_l['quiz'].append(prev_q)
|
||||
lessons[prev_l_id] = prev_l
|
||||
|
||||
lesson_content = {}
|
||||
for k,v in lessons.items():
|
||||
no = int(k[:-1])
|
||||
if no not in lesson_content.keys():
|
||||
lesson_content[no] = deepcopy(doc)
|
||||
lesson_content[no][0]['quizzes'].append(v)
|
||||
|
||||
with open(os.path.join(dst_dir,'index.js'),'w',encoding='utf-8') as f:
|
||||
for i,k in enumerate(lesson_content.keys()):
|
||||
f.write(f'import x{k} from "./lesson-{k}.json";\n')
|
||||
t = ', '.join([ f"{i} : x{k}[0]" for i,k in enumerate(lesson_content.keys())]);
|
||||
f.write(f"const quiz = {{ {t} }}; \n");
|
||||
f.write("export default quiz;")
|
||||
|
||||
for k,v in lesson_content.items():
|
||||
with open(os.path.join(dst_dir,f"lesson-{k}.json"),'w', encoding='utf-8') as f:
|
||||
json.dump(v,f,indent=2)
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"title": "AI for Beginners: Quizzes",
|
||||
"complete": "Congratulations, you completed the quiz!",
|
||||
"error": "Sorry, try again",
|
||||
"quizzes": [
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,138 @@
|
||||
"""
|
||||
Hello AI World - Your First AI Program
|
||||
=======================================
|
||||
|
||||
This is a simple pattern recognition example that demonstrates core AI concepts:
|
||||
- Learning from data
|
||||
- Making predictions
|
||||
- Understanding patterns
|
||||
|
||||
What this program does:
|
||||
- Learns a simple mathematical pattern (y = 2x)
|
||||
- Uses that pattern to make predictions
|
||||
- No complex libraries needed - just pure Python!
|
||||
|
||||
Perfect for understanding AI basics before diving into neural networks.
|
||||
"""
|
||||
|
||||
import random
|
||||
|
||||
class SimpleAILearner:
|
||||
"""
|
||||
A very simple AI that learns linear relationships.
|
||||
This demonstrates the fundamental concept of AI: learning from data.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
# The "weight" is what our AI learns
|
||||
# It starts with a random guess
|
||||
self.weight = random.uniform(0, 5)
|
||||
self.learning_rate = 0.01 # How fast our AI learns
|
||||
|
||||
def predict(self, x):
|
||||
"""
|
||||
Make a prediction based on what we've learned.
|
||||
|
||||
Args:
|
||||
x: Input value
|
||||
|
||||
Returns:
|
||||
Predicted output
|
||||
"""
|
||||
return self.weight * x
|
||||
|
||||
def train(self, training_data, epochs=100):
|
||||
"""
|
||||
Train the AI to learn the pattern in the data.
|
||||
|
||||
Args:
|
||||
training_data: List of (input, output) pairs
|
||||
epochs: Number of times to go through all the data
|
||||
"""
|
||||
print("🎓 Training started...")
|
||||
print(f"Initial guess for weight: {self.weight:.2f}")
|
||||
|
||||
for epoch in range(epochs):
|
||||
total_error = 0
|
||||
|
||||
# Learn from each example
|
||||
for x, y_actual in training_data:
|
||||
# Make a prediction
|
||||
y_predicted = self.predict(x)
|
||||
|
||||
# Calculate error (how wrong we were)
|
||||
error = y_actual - y_predicted
|
||||
total_error += abs(error)
|
||||
|
||||
# Update our weight to reduce error (this is learning!)
|
||||
self.weight += self.learning_rate * error * x
|
||||
|
||||
# Print progress every 20 epochs
|
||||
if (epoch + 1) % 20 == 0:
|
||||
avg_error = total_error / len(training_data)
|
||||
print(f"Epoch {epoch + 1}/{epochs} - Average error: {avg_error:.4f} - Weight: {self.weight:.2f}")
|
||||
|
||||
print(f"✅ Training complete! Final weight: {self.weight:.2f}")
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Main function - Let's teach our AI!
|
||||
"""
|
||||
print("=" * 60)
|
||||
print("Welcome to Hello AI World!")
|
||||
print("=" * 60)
|
||||
print()
|
||||
print("Today, we'll teach an AI to learn a simple pattern:")
|
||||
print("Given x, predict y where y = 2x")
|
||||
print()
|
||||
|
||||
# Step 1: Create training data
|
||||
# The pattern we want the AI to learn: y = 2 * x
|
||||
print("📊 Creating training data...")
|
||||
training_data = [
|
||||
(1, 2), # When x=1, y should be 2
|
||||
(2, 4), # When x=2, y should be 4
|
||||
(3, 6), # When x=3, y should be 6
|
||||
(4, 8), # When x=4, y should be 8
|
||||
(5, 10), # When x=5, y should be 10
|
||||
]
|
||||
print(f"Training examples: {training_data}")
|
||||
print()
|
||||
|
||||
# Step 2: Create and train our AI
|
||||
ai = SimpleAILearner()
|
||||
ai.train(training_data, epochs=100)
|
||||
print()
|
||||
|
||||
# Step 3: Test our AI with new data
|
||||
print("🧪 Testing our AI with new inputs...")
|
||||
print("-" * 60)
|
||||
test_inputs = [6, 7, 10, 15]
|
||||
|
||||
for x in test_inputs:
|
||||
prediction = ai.predict(x)
|
||||
actual = 2 * x # The true answer
|
||||
print(f"Input: {x:2d} | Prediction: {prediction:6.2f} | Actual: {actual:6.2f} | Difference: {abs(prediction - actual):.2f}")
|
||||
|
||||
print("-" * 60)
|
||||
print()
|
||||
|
||||
# Explanation
|
||||
print("💡 What just happened?")
|
||||
print("1. We gave the AI examples of the pattern (y = 2x)")
|
||||
print("2. The AI learned by adjusting its 'weight' to minimize errors")
|
||||
print("3. After training, it can predict outputs for new inputs!")
|
||||
print()
|
||||
print("🎉 Congratulations! You just trained your first AI!")
|
||||
print()
|
||||
print("🚀 Next steps:")
|
||||
print(" - Try changing the training data to learn different patterns")
|
||||
print(" - Experiment with the learning_rate (line 29)")
|
||||
print(" - Modify epochs to see how training time affects accuracy")
|
||||
print()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# This runs when you execute the script
|
||||
main()
|
||||
@@ -0,0 +1,259 @@
|
||||
"""
|
||||
Simple Neural Network from Scratch
|
||||
===================================
|
||||
|
||||
This example builds a basic neural network without using any ML frameworks.
|
||||
It helps you understand what's happening "under the hood" in neural networks.
|
||||
|
||||
What you'll learn:
|
||||
- How neurons work
|
||||
- Forward propagation (making predictions)
|
||||
- Backward propagation (learning from mistakes)
|
||||
- The sigmoid activation function
|
||||
|
||||
Use case: Learn to classify points as "above" or "below" a line.
|
||||
"""
|
||||
|
||||
import random
|
||||
import math
|
||||
|
||||
def sigmoid(x):
|
||||
"""
|
||||
Sigmoid activation function: converts any value to a number between 0 and 1.
|
||||
|
||||
This is like asking "how confident are we?"
|
||||
- Values close to 1 mean "very confident YES"
|
||||
- Values close to 0 mean "very confident NO"
|
||||
- Values around 0.5 mean "not sure"
|
||||
|
||||
Args:
|
||||
x: Input value
|
||||
|
||||
Returns:
|
||||
Value between 0 and 1
|
||||
"""
|
||||
# Prevent overflow for very large/small numbers
|
||||
if x > 100:
|
||||
return 1.0
|
||||
if x < -100:
|
||||
return 0.0
|
||||
return 1 / (1 + math.exp(-x))
|
||||
|
||||
|
||||
def sigmoid_derivative(x):
|
||||
"""
|
||||
Derivative of sigmoid function - needed for learning.
|
||||
This tells us how much to adjust our weights.
|
||||
|
||||
Args:
|
||||
x: Sigmoid output value
|
||||
|
||||
Returns:
|
||||
Derivative value
|
||||
"""
|
||||
return x * (1 - x)
|
||||
|
||||
|
||||
class SimpleNeuron:
|
||||
"""
|
||||
A single artificial neuron - the building block of neural networks.
|
||||
|
||||
Think of it as a tiny decision maker that:
|
||||
1. Takes inputs (like features of data)
|
||||
2. Multiplies them by learned weights
|
||||
3. Adds them up with a bias
|
||||
4. Applies an activation function
|
||||
5. Outputs a prediction
|
||||
"""
|
||||
|
||||
def __init__(self, num_inputs):
|
||||
"""
|
||||
Initialize the neuron with random weights.
|
||||
|
||||
Args:
|
||||
num_inputs: Number of input values this neuron will receive
|
||||
"""
|
||||
# Each input gets a weight (how important is this input?)
|
||||
self.weights = [random.uniform(-1, 1) for _ in range(num_inputs)]
|
||||
# Bias helps adjust the output
|
||||
self.bias = random.uniform(-1, 1)
|
||||
# Store the last output for learning
|
||||
self.output = 0
|
||||
|
||||
def feedforward(self, inputs):
|
||||
"""
|
||||
Calculate the neuron's output (prediction).
|
||||
This is called "forward propagation".
|
||||
|
||||
Args:
|
||||
inputs: List of input values
|
||||
|
||||
Returns:
|
||||
Neuron's output (between 0 and 1)
|
||||
"""
|
||||
# Step 1: Multiply each input by its weight and sum them
|
||||
total = sum(w * x for w, x in zip(self.weights, inputs))
|
||||
|
||||
# Step 2: Add bias
|
||||
total += self.bias
|
||||
|
||||
# Step 3: Apply activation function (sigmoid)
|
||||
self.output = sigmoid(total)
|
||||
|
||||
return self.output
|
||||
|
||||
def train(self, inputs, target, learning_rate=0.1):
|
||||
"""
|
||||
Teach the neuron to improve its predictions.
|
||||
This is called "backpropagation".
|
||||
|
||||
Args:
|
||||
inputs: The input values
|
||||
target: What the output should have been
|
||||
learning_rate: How much to adjust weights
|
||||
"""
|
||||
# Calculate error
|
||||
error = target - self.output
|
||||
|
||||
# Calculate adjustment amount using derivative
|
||||
delta = error * sigmoid_derivative(self.output)
|
||||
|
||||
# Update weights
|
||||
for i in range(len(self.weights)):
|
||||
self.weights[i] += learning_rate * delta * inputs[i]
|
||||
|
||||
# Update bias
|
||||
self.bias += learning_rate * delta
|
||||
|
||||
return abs(error)
|
||||
|
||||
|
||||
def generate_training_data(num_samples=100):
|
||||
"""
|
||||
Generate sample data for training.
|
||||
|
||||
Task: Classify points as above (1) or below (0) the line y = x.
|
||||
|
||||
Args:
|
||||
num_samples: How many training examples to create
|
||||
|
||||
Returns:
|
||||
List of (inputs, target) tuples
|
||||
"""
|
||||
data = []
|
||||
for _ in range(num_samples):
|
||||
# Random point in 2D space (x, y coordinates)
|
||||
x = random.uniform(0, 10)
|
||||
y = random.uniform(0, 10)
|
||||
|
||||
# Label: 1 if point is above the line y=x, 0 if below
|
||||
label = 1 if y > x else 0
|
||||
|
||||
data.append(([x, y], label))
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def visualize_decision(neuron, test_points):
|
||||
"""
|
||||
Show how the neuron classifies different points.
|
||||
|
||||
Args:
|
||||
neuron: Trained neuron
|
||||
test_points: List of points to test
|
||||
"""
|
||||
print("\n🎯 Testing the trained neuron:")
|
||||
print("-" * 70)
|
||||
print(f"{'Point':<15} | {'Prediction':<15} | {'Actual':<15} | {'Correct?'}")
|
||||
print("-" * 70)
|
||||
|
||||
correct = 0
|
||||
for point, actual in test_points:
|
||||
prediction = neuron.feedforward(point)
|
||||
predicted_class = 1 if prediction > 0.5 else 0
|
||||
actual_class = actual
|
||||
is_correct = "✓" if predicted_class == actual_class else "✗"
|
||||
|
||||
if predicted_class == actual_class:
|
||||
correct += 1
|
||||
|
||||
print(f"({point[0]:5.2f}, {point[1]:5.2f}) | {prediction:14.4f} | {actual_class:^15} | {is_correct}")
|
||||
|
||||
print("-" * 70)
|
||||
accuracy = (correct / len(test_points)) * 100
|
||||
print(f"Accuracy: {accuracy:.1f}% ({correct}/{len(test_points)} correct)")
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Main function - Build and train a neural network!
|
||||
"""
|
||||
print("=" * 70)
|
||||
print("Simple Neural Network from Scratch")
|
||||
print("=" * 70)
|
||||
print("\n📚 Task: Learn to classify points as above or below the line y = x")
|
||||
print()
|
||||
|
||||
# Step 1: Generate training data
|
||||
print("📊 Generating training data...")
|
||||
training_data = generate_training_data(num_samples=100)
|
||||
print(f"Created {len(training_data)} training examples")
|
||||
|
||||
# Show a few examples
|
||||
print("\nExample training data:")
|
||||
for i in range(3):
|
||||
point, label = training_data[i]
|
||||
position = "above" if label == 1 else "below"
|
||||
print(f" Point ({point[0]:.2f}, {point[1]:.2f}) is {position} the line y=x")
|
||||
|
||||
# Step 2: Create neuron
|
||||
print("\n🧠 Creating a neuron with 2 inputs (x and y coordinates)...")
|
||||
neuron = SimpleNeuron(num_inputs=2)
|
||||
print(f"Initial weights: [{neuron.weights[0]:.3f}, {neuron.weights[1]:.3f}]")
|
||||
print(f"Initial bias: {neuron.bias:.3f}")
|
||||
|
||||
# Step 3: Train the neuron
|
||||
print("\n🎓 Training the neuron...")
|
||||
epochs = 50
|
||||
|
||||
for epoch in range(epochs):
|
||||
total_error = 0
|
||||
|
||||
# Train on each example
|
||||
for inputs, target in training_data:
|
||||
neuron.feedforward(inputs)
|
||||
error = neuron.train(inputs, target, learning_rate=0.1)
|
||||
total_error += error
|
||||
|
||||
# Show progress
|
||||
if (epoch + 1) % 10 == 0:
|
||||
avg_error = total_error / len(training_data)
|
||||
print(f"Epoch {epoch + 1}/{epochs} - Average error: {avg_error:.4f}")
|
||||
|
||||
print("\n✅ Training complete!")
|
||||
print(f"Final weights: [{neuron.weights[0]:.3f}, {neuron.weights[1]:.3f}]")
|
||||
print(f"Final bias: {neuron.bias:.3f}")
|
||||
|
||||
# Step 4: Test the neuron
|
||||
test_data = generate_training_data(num_samples=10)
|
||||
visualize_decision(neuron, test_data)
|
||||
|
||||
# Explanation
|
||||
print("\n💡 What just happened?")
|
||||
print("1. The neuron started with random weights")
|
||||
print("2. It looked at 100 example points and their correct labels")
|
||||
print("3. Each time it was wrong, it adjusted its weights slightly")
|
||||
print("4. After 50 rounds, it learned to classify points correctly!")
|
||||
print()
|
||||
print("🎉 You just built a neural network from scratch!")
|
||||
print()
|
||||
print("🚀 Try this:")
|
||||
print(" - Change num_samples to train on more/fewer examples")
|
||||
print(" - Modify epochs to train for longer/shorter")
|
||||
print(" - Change learning_rate (line 185) and see what happens")
|
||||
print(" - Try different decision boundaries (modify generate_training_data)")
|
||||
print()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,384 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Simple Image Classifier\n",
|
||||
"\n",
|
||||
"This notebook shows you how to classify images using a pre-trained neural network.\n",
|
||||
"\n",
|
||||
"**What you'll learn:**\n",
|
||||
"- How to load and use a pre-trained model\n",
|
||||
"- Image preprocessing\n",
|
||||
"- Making predictions on images\n",
|
||||
"- Understanding confidence scores\n",
|
||||
"\n",
|
||||
"**Use case:** Identify objects in images (like \"cat\", \"dog\", \"car\", etc.)\n",
|
||||
"\n",
|
||||
"---"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Step 1: Import Required Libraries\n",
|
||||
"\n",
|
||||
"Let's import the tools we need. Don't worry if you don't understand all of these yet!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Core libraries\n",
|
||||
"import numpy as np\n",
|
||||
"from PIL import Image\n",
|
||||
"import requests\n",
|
||||
"from io import BytesIO\n",
|
||||
"\n",
|
||||
"# TensorFlow for deep learning\n",
|
||||
"try:\n",
|
||||
" import tensorflow as tf\n",
|
||||
" from tensorflow.keras.applications import MobileNetV2\n",
|
||||
" from tensorflow.keras.applications.mobilenet_v2 import preprocess_input, decode_predictions\n",
|
||||
" print(\"✅ TensorFlow loaded successfully!\")\n",
|
||||
" print(f\" Version: {tf.__version__}\")\n",
|
||||
"except ImportError:\n",
|
||||
" print(\"❌ Please install TensorFlow: pip install tensorflow\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Step 2: Load Pre-trained Model\n",
|
||||
"\n",
|
||||
"We'll use **MobileNetV2**, a neural network already trained on millions of images.\n",
|
||||
"\n",
|
||||
"This is called **Transfer Learning** - using a model someone else trained!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"📦 Loading pre-trained MobileNetV2 model...\")\n",
|
||||
"print(\" This may take a minute on first run (downloading weights)...\")\n",
|
||||
"\n",
|
||||
"# Load the model\n",
|
||||
"# include_top=True means we use the classification layer\n",
|
||||
"# weights='imagenet' means it was trained on ImageNet dataset\n",
|
||||
"model = MobileNetV2(weights='imagenet', include_top=True)\n",
|
||||
"\n",
|
||||
"print(\"✅ Model loaded!\")\n",
|
||||
"print(f\" The model can recognize 1000 different object categories\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Step 3: Helper Functions\n",
|
||||
"\n",
|
||||
"Let's create functions to load and prepare images for our model."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def load_image_from_url(url):\n",
|
||||
" \"\"\"\n",
|
||||
" Load an image from a URL.\n",
|
||||
" \n",
|
||||
" Args:\n",
|
||||
" url: Web address of the image\n",
|
||||
" \n",
|
||||
" Returns:\n",
|
||||
" PIL Image object\n",
|
||||
" \"\"\"\n",
|
||||
" response = requests.get(url)\n",
|
||||
" img = Image.open(BytesIO(response.content))\n",
|
||||
" return img\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def prepare_image(img):\n",
|
||||
" \"\"\"\n",
|
||||
" Prepare an image for the model.\n",
|
||||
" \n",
|
||||
" Steps:\n",
|
||||
" 1. Resize to 224x224 (model's expected size)\n",
|
||||
" 2. Convert to array\n",
|
||||
" 3. Add batch dimension\n",
|
||||
" 4. Preprocess for MobileNetV2\n",
|
||||
" \n",
|
||||
" Args:\n",
|
||||
" img: PIL Image\n",
|
||||
" \n",
|
||||
" Returns:\n",
|
||||
" Preprocessed image array\n",
|
||||
" \"\"\"\n",
|
||||
" # Resize to 224x224 pixels\n",
|
||||
" img = img.resize((224, 224))\n",
|
||||
" \n",
|
||||
" # Convert to numpy array\n",
|
||||
" img_array = np.array(img)\n",
|
||||
" \n",
|
||||
" # Add batch dimension (model expects multiple images)\n",
|
||||
" img_array = np.expand_dims(img_array, axis=0)\n",
|
||||
" \n",
|
||||
" # Preprocess for MobileNetV2\n",
|
||||
" img_array = preprocess_input(img_array)\n",
|
||||
" \n",
|
||||
" return img_array\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def classify_image(img):\n",
|
||||
" \"\"\"\n",
|
||||
" Classify an image and return top predictions.\n",
|
||||
" \n",
|
||||
" Args:\n",
|
||||
" img: PIL Image\n",
|
||||
" \n",
|
||||
" Returns:\n",
|
||||
" List of (class_name, confidence) tuples\n",
|
||||
" \"\"\"\n",
|
||||
" # Prepare the image\n",
|
||||
" img_array = prepare_image(img)\n",
|
||||
" \n",
|
||||
" # Make prediction\n",
|
||||
" predictions = model.predict(img_array, verbose=0)\n",
|
||||
" \n",
|
||||
" # Decode predictions to human-readable labels\n",
|
||||
" # top=5 means we get the top 5 most likely classes\n",
|
||||
" decoded = decode_predictions(predictions, top=5)[0]\n",
|
||||
" \n",
|
||||
" # Convert to simpler format\n",
|
||||
" results = [(label, float(confidence)) for (_, label, confidence) in decoded]\n",
|
||||
" \n",
|
||||
" return results\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"print(\"✅ Helper functions ready!\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Step 4: Test on Sample Images\n",
|
||||
"\n",
|
||||
"Let's try classifying some images from the internet!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Sample images to classify\n",
|
||||
"# These are from Unsplash (free stock photos)\n",
|
||||
"test_images = [\n",
|
||||
" {\n",
|
||||
" \"url\": \"https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?w=400\",\n",
|
||||
" \"description\": \"A cat\"\n",
|
||||
" },\n",
|
||||
" {\n",
|
||||
" \"url\": \"https://images.unsplash.com/photo-1552053831-71594a27632d?w=400\",\n",
|
||||
" \"description\": \"A dog\"\n",
|
||||
" },\n",
|
||||
" {\n",
|
||||
" \"url\": \"https://images.unsplash.com/photo-1511919884226-fd3cad34687c?w=400\",\n",
|
||||
" \"description\": \"A car\"\n",
|
||||
" },\n",
|
||||
"]\n",
|
||||
"\n",
|
||||
"print(f\"🧪 Testing on {len(test_images)} images...\")\n",
|
||||
"print(\"=\" * 70)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Classify Each Image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for i, img_data in enumerate(test_images, 1):\n",
|
||||
" print(f\"\\n📸 Image {i}: {img_data['description']}\")\n",
|
||||
" print(\"-\" * 70)\n",
|
||||
" \n",
|
||||
" try:\n",
|
||||
" # Load image\n",
|
||||
" img = load_image_from_url(img_data['url'])\n",
|
||||
" \n",
|
||||
" # Display image\n",
|
||||
" display(img.resize((200, 200))) # Show smaller version\n",
|
||||
" \n",
|
||||
" # Classify\n",
|
||||
" results = classify_image(img)\n",
|
||||
" \n",
|
||||
" # Show predictions\n",
|
||||
" print(\"\\n🎯 Top 5 Predictions:\")\n",
|
||||
" for rank, (label, confidence) in enumerate(results, 1):\n",
|
||||
" # Create a visual bar\n",
|
||||
" bar_length = int(confidence * 50)\n",
|
||||
" bar = \"█\" * bar_length\n",
|
||||
" \n",
|
||||
" print(f\" {rank}. {label:20s} {confidence*100:5.2f}% {bar}\")\n",
|
||||
" \n",
|
||||
" except Exception as e:\n",
|
||||
" print(f\"❌ Error: {e}\")\n",
|
||||
"\n",
|
||||
"print(\"\\n\" + \"=\" * 70)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Step 5: Try Your Own Images!\n",
|
||||
"\n",
|
||||
"Replace the URL below with any image URL you want to classify."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Try your own image!\n",
|
||||
"# Replace this URL with any image URL\n",
|
||||
"custom_image_url = \"https://images.unsplash.com/photo-1472491235688-bdc81a63246e?w=400\" # A flower\n",
|
||||
"\n",
|
||||
"print(\"🖼️ Classifying your custom image...\")\n",
|
||||
"print(\"=\" * 70)\n",
|
||||
"\n",
|
||||
"try:\n",
|
||||
" # Load and show image\n",
|
||||
" img = load_image_from_url(custom_image_url)\n",
|
||||
" display(img.resize((300, 300)))\n",
|
||||
" \n",
|
||||
" # Classify\n",
|
||||
" results = classify_image(img)\n",
|
||||
" \n",
|
||||
" # Show results\n",
|
||||
" print(\"\\n🎯 Top 5 Predictions:\")\n",
|
||||
" print(\"-\" * 70)\n",
|
||||
" for rank, (label, confidence) in enumerate(results, 1):\n",
|
||||
" bar_length = int(confidence * 50)\n",
|
||||
" bar = \"█\" * bar_length\n",
|
||||
" print(f\" {rank}. {label:20s} {confidence*100:5.2f}% {bar}\")\n",
|
||||
" \n",
|
||||
" # Highlight top prediction\n",
|
||||
" top_label, top_confidence = results[0]\n",
|
||||
" print(\"\\n\" + \"=\" * 70)\n",
|
||||
" print(f\"\\n🏆 Best guess: {top_label} ({top_confidence*100:.2f}% confident)\")\n",
|
||||
" \n",
|
||||
"except Exception as e:\n",
|
||||
" print(f\"❌ Error: {e}\")\n",
|
||||
" print(\" Make sure the URL points to a valid image!\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 💡 What Just Happened?\n",
|
||||
"\n",
|
||||
"1. **We loaded a pre-trained model** - MobileNetV2 was trained on millions of images\n",
|
||||
"2. **We preprocessed images** - Resized and formatted them for the model\n",
|
||||
"3. **The model made predictions** - It output probabilities for 1000 object classes\n",
|
||||
"4. **We decoded the results** - Converted numbers to human-readable labels\n",
|
||||
"\n",
|
||||
"### Understanding Confidence Scores\n",
|
||||
"\n",
|
||||
"- **90-100%**: Very confident (almost certainly correct)\n",
|
||||
"- **70-90%**: Confident (probably correct)\n",
|
||||
"- **50-70%**: Somewhat confident (might be correct)\n",
|
||||
"- **Below 50%**: Not very confident (uncertain)\n",
|
||||
"\n",
|
||||
"### Why might predictions be wrong?\n",
|
||||
"\n",
|
||||
"- **Unusual angle or lighting** - Model was trained on typical photos\n",
|
||||
"- **Multiple objects** - Model expects one main object\n",
|
||||
"- **Rare objects** - Model only knows 1000 categories\n",
|
||||
"- **Low quality image** - Blurry or pixelated images are harder\n",
|
||||
"\n",
|
||||
"---"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## 🚀 Next Steps\n",
|
||||
"\n",
|
||||
"1. **Try different images:**\n",
|
||||
" - Find images on [Unsplash](https://unsplash.com)\n",
|
||||
" - Right-click → \"Copy image address\" to get URL\n",
|
||||
"\n",
|
||||
"2. **Experiment:**\n",
|
||||
" - What happens with abstract art?\n",
|
||||
" - Can it recognize objects from different angles?\n",
|
||||
" - How does it handle multiple objects?\n",
|
||||
"\n",
|
||||
"3. **Learn more:**\n",
|
||||
" - Explore [Computer Vision lessons](../lessons/4-ComputerVision/README.md)\n",
|
||||
" - Learn to train your own image classifier\n",
|
||||
" - Understand how CNNs (Convolutional Neural Networks) work\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"## 🎉 Congratulations!\n",
|
||||
"\n",
|
||||
"You just built an image classifier using a state-of-the-art neural network!\n",
|
||||
"\n",
|
||||
"This same technique powers:\n",
|
||||
"- Google Photos (organizing your photos)\n",
|
||||
"- Self-driving cars (recognizing objects)\n",
|
||||
"- Medical diagnosis (analyzing X-rays)\n",
|
||||
"- Quality control (detecting defects)\n",
|
||||
"\n",
|
||||
"Keep exploring and learning! 🚀"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.0"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
@@ -0,0 +1,268 @@
|
||||
"""
|
||||
Simple Text Sentiment Analysis
|
||||
================================
|
||||
|
||||
This example shows how to analyze the sentiment (emotion) of text.
|
||||
It's a simplified version that teaches NLP concepts without complex libraries.
|
||||
|
||||
What you'll learn:
|
||||
- Text preprocessing (cleaning and preparing text)
|
||||
- Feature extraction (converting words to numbers)
|
||||
- Sentiment classification (positive vs negative)
|
||||
|
||||
Use case: Determine if a movie review is positive or negative.
|
||||
"""
|
||||
|
||||
import re
|
||||
from collections import Counter
|
||||
|
||||
class SimpleSentimentAnalyzer:
|
||||
"""
|
||||
A basic sentiment analyzer that learns from labeled examples.
|
||||
|
||||
How it works:
|
||||
1. Learns which words appear more in positive vs negative texts
|
||||
2. Calculates a "sentiment score" for each word
|
||||
3. Uses these scores to predict sentiment of new text
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
# Store word scores (positive words get positive scores)
|
||||
self.word_scores = {}
|
||||
# Track if we've trained
|
||||
self.is_trained = False
|
||||
|
||||
def preprocess_text(self, text):
|
||||
"""
|
||||
Clean and prepare text for analysis.
|
||||
|
||||
Steps:
|
||||
1. Convert to lowercase
|
||||
2. Remove punctuation
|
||||
3. Split into words
|
||||
|
||||
Args:
|
||||
text: Raw text string
|
||||
|
||||
Returns:
|
||||
List of cleaned words
|
||||
"""
|
||||
# Convert to lowercase
|
||||
text = text.lower()
|
||||
|
||||
# Remove punctuation and special characters
|
||||
text = re.sub(r'[^a-z\s]', '', text)
|
||||
|
||||
# Split into words
|
||||
words = text.split()
|
||||
|
||||
# Remove very short words (like "a", "i")
|
||||
words = [w for w in words if len(w) > 2]
|
||||
|
||||
return words
|
||||
|
||||
def train(self, training_data):
|
||||
"""
|
||||
Learn sentiment patterns from labeled examples.
|
||||
|
||||
Args:
|
||||
training_data: List of (text, sentiment) tuples
|
||||
where sentiment is 'positive' or 'negative'
|
||||
"""
|
||||
print("🎓 Training sentiment analyzer...")
|
||||
|
||||
# Count words in positive and negative texts
|
||||
positive_words = Counter()
|
||||
negative_words = Counter()
|
||||
|
||||
for text, sentiment in training_data:
|
||||
words = self.preprocess_text(text)
|
||||
|
||||
if sentiment == 'positive':
|
||||
positive_words.update(words)
|
||||
else:
|
||||
negative_words.update(words)
|
||||
|
||||
# Calculate sentiment score for each word
|
||||
# Score > 0 means more positive, < 0 means more negative
|
||||
all_words = set(positive_words.keys()) | set(negative_words.keys())
|
||||
|
||||
for word in all_words:
|
||||
pos_count = positive_words[word]
|
||||
neg_count = negative_words[word]
|
||||
|
||||
# Calculate score: difference in appearances
|
||||
# Add smoothing (+1) to avoid division by zero
|
||||
total = pos_count + neg_count
|
||||
self.word_scores[word] = (pos_count - neg_count) / (total + 1)
|
||||
|
||||
self.is_trained = True
|
||||
|
||||
# Show some learned words
|
||||
print(f"✅ Learned sentiment for {len(self.word_scores)} words")
|
||||
print("\n📊 Most positive words:")
|
||||
sorted_words = sorted(self.word_scores.items(), key=lambda x: x[1], reverse=True)
|
||||
for word, score in sorted_words[:5]:
|
||||
print(f" '{word}': {score:+.3f}")
|
||||
|
||||
print("\n📊 Most negative words:")
|
||||
for word, score in sorted_words[-5:]:
|
||||
print(f" '{word}': {score:+.3f}")
|
||||
|
||||
def analyze(self, text):
|
||||
"""
|
||||
Predict the sentiment of new text.
|
||||
|
||||
Args:
|
||||
text: Text to analyze
|
||||
|
||||
Returns:
|
||||
Tuple of (sentiment, confidence, score)
|
||||
"""
|
||||
if not self.is_trained:
|
||||
raise Exception("Please train the analyzer first!")
|
||||
|
||||
# Preprocess text
|
||||
words = self.preprocess_text(text)
|
||||
|
||||
# Calculate total sentiment score
|
||||
total_score = 0
|
||||
word_count = 0
|
||||
|
||||
for word in words:
|
||||
if word in self.word_scores:
|
||||
total_score += self.word_scores[word]
|
||||
word_count += 1
|
||||
|
||||
# Average score
|
||||
if word_count > 0:
|
||||
avg_score = total_score / word_count
|
||||
else:
|
||||
avg_score = 0
|
||||
|
||||
# Determine sentiment and confidence
|
||||
sentiment = "positive" if avg_score > 0 else "negative"
|
||||
confidence = min(abs(avg_score) * 100, 100) # Convert to percentage
|
||||
|
||||
return sentiment, confidence, avg_score
|
||||
|
||||
|
||||
def create_training_data():
|
||||
"""
|
||||
Create sample training data (movie reviews with labels).
|
||||
|
||||
In a real application, you'd have thousands of examples!
|
||||
|
||||
Returns:
|
||||
List of (review_text, sentiment) tuples
|
||||
"""
|
||||
return [
|
||||
# Positive reviews
|
||||
("This movie was absolutely amazing and wonderful! I loved every minute.", "positive"),
|
||||
("Brilliant performance! The acting was superb and the story captivating.", "positive"),
|
||||
("Fantastic film! Highly recommend to everyone. Best movie of the year!", "positive"),
|
||||
("Loved it! Great storytelling and beautiful cinematography.", "positive"),
|
||||
("Excellent movie with outstanding performances. A must watch!", "positive"),
|
||||
("Amazing! This film exceeded all my expectations. Truly remarkable.", "positive"),
|
||||
("Wonderful experience! The plot was engaging and entertaining.", "positive"),
|
||||
("Superb direction and acting! One of the best films I've seen.", "positive"),
|
||||
|
||||
# Negative reviews
|
||||
("Terrible movie. Waste of time and money. Very disappointed.", "negative"),
|
||||
("Awful film! Poor acting and boring story. Would not recommend.", "negative"),
|
||||
("Horrible! The worst movie I have ever seen. Extremely disappointing.", "negative"),
|
||||
("Bad movie with terrible plot. Boring and predictable.", "negative"),
|
||||
("Disappointing film. Poor execution and weak performances.", "negative"),
|
||||
("Worst movie ever! Horrible acting and stupid storyline.", "negative"),
|
||||
("Terrible experience. Boring and poorly made. Don't waste your time.", "negative"),
|
||||
("Awful! Poor quality and uninteresting. Complete waste of time.", "negative"),
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Main function - Let's analyze some sentiments!
|
||||
"""
|
||||
print("=" * 70)
|
||||
print("Simple Text Sentiment Analysis")
|
||||
print("=" * 70)
|
||||
print("\n📚 Task: Learn to identify positive and negative movie reviews")
|
||||
print()
|
||||
|
||||
# Step 1: Create training data
|
||||
training_data = create_training_data()
|
||||
print(f"📊 Training data: {len(training_data)} movie reviews")
|
||||
print()
|
||||
|
||||
# Step 2: Create and train analyzer
|
||||
analyzer = SimpleSentimentAnalyzer()
|
||||
analyzer.train(training_data)
|
||||
print()
|
||||
|
||||
# Step 3: Test on new reviews
|
||||
print("🧪 Testing on new movie reviews:")
|
||||
print("=" * 70)
|
||||
|
||||
test_reviews = [
|
||||
"This movie was fantastic! I really enjoyed it.",
|
||||
"Boring and terrible. Not worth watching.",
|
||||
"Amazing cinematography and wonderful acting!",
|
||||
"The worst film I've seen this year. Awful.",
|
||||
"Pretty good movie with some great moments.",
|
||||
"Disappointing and poorly directed.",
|
||||
]
|
||||
|
||||
for i, review in enumerate(test_reviews, 1):
|
||||
sentiment, confidence, score = analyzer.analyze(review)
|
||||
|
||||
# Visual indicator
|
||||
indicator = "😊" if sentiment == "positive" else "😞"
|
||||
|
||||
print(f"\nReview {i}:")
|
||||
print(f" Text: \"{review}\"")
|
||||
print(f" {indicator} Sentiment: {sentiment.upper()}")
|
||||
print(f" 📊 Confidence: {confidence:.1f}%")
|
||||
print(f" 📈 Score: {score:+.3f}")
|
||||
|
||||
print("\n" + "=" * 70)
|
||||
|
||||
# Interactive mode
|
||||
print("\n💬 Try it yourself! Enter your own review (or 'quit' to exit):")
|
||||
print("-" * 70)
|
||||
|
||||
while True:
|
||||
user_input = input("\nYour review: ").strip()
|
||||
|
||||
if user_input.lower() in ['quit', 'exit', 'q']:
|
||||
break
|
||||
|
||||
if not user_input:
|
||||
continue
|
||||
|
||||
try:
|
||||
sentiment, confidence, score = analyzer.analyze(user_input)
|
||||
indicator = "😊" if sentiment == "positive" else "😞"
|
||||
|
||||
print(f"\n{indicator} Sentiment: {sentiment.upper()}")
|
||||
print(f"📊 Confidence: {confidence:.1f}%")
|
||||
print(f"📈 Score: {score:+.3f}")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
|
||||
# Explanation
|
||||
print("\n💡 What just happened?")
|
||||
print("1. The analyzer learned word patterns from example reviews")
|
||||
print("2. It calculated 'sentiment scores' for words")
|
||||
print("3. For new text, it combines word scores to predict sentiment")
|
||||
print()
|
||||
print("🎉 You just built a sentiment analyzer!")
|
||||
print()
|
||||
print("🚀 Next steps:")
|
||||
print(" - Add more training examples to improve accuracy")
|
||||
print(" - Try analyzing tweets, product reviews, or comments")
|
||||
print(" - Explore more advanced NLP in lessons/5-NLP/")
|
||||
print()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,80 @@
|
||||
# Beginner-Friendly AI Examples
|
||||
|
||||
Welcome! This directory contains simple, standalone examples to help you get started with AI and machine learning. Each example is designed to be beginner-friendly with detailed comments and step-by-step explanations.
|
||||
|
||||
## 📚 Examples Overview
|
||||
|
||||
| Example | Description | Difficulty | Prerequisites |
|
||||
|---------|-------------|------------|---------------|
|
||||
| [Hello AI World](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/01-hello-ai-world.py) | Your first AI program - simple pattern recognition | ⭐ Beginner | Python basics |
|
||||
| [Simple Neural Network](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/02-simple-neural-network.py) | Build a neural network from scratch | ⭐⭐ Beginner+ | Python, basic math |
|
||||
| [Image Classifier](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/03-image-classifier.ipynb) | Classify images with a pre-trained model | ⭐⭐ Beginner+ | Python, numpy |
|
||||
| [Text Sentiment](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/04-text-sentiment.py) | Analyze text sentiment (positive/negative) | ⭐⭐ Beginner+ | Python |
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Make sure you have Python installed (3.8 or higher recommended). Install required packages:
|
||||
|
||||
```bash
|
||||
# For Python scripts
|
||||
pip install numpy
|
||||
|
||||
# For Jupyter notebooks (image classifier)
|
||||
pip install jupyter numpy pillow tensorflow
|
||||
```
|
||||
|
||||
Or use the conda environment from the main curriculum:
|
||||
|
||||
```bash
|
||||
conda env create --name ai4beg --file ../environment.yml
|
||||
conda activate ai4beg
|
||||
```
|
||||
|
||||
### Running the Examples
|
||||
|
||||
**For Python scripts (.py files):**
|
||||
```bash
|
||||
python 01-hello-ai-world.py
|
||||
```
|
||||
|
||||
**For Jupyter notebooks (.ipynb files):**
|
||||
```bash
|
||||
jupyter notebook 03-image-classifier.ipynb
|
||||
```
|
||||
|
||||
## 📖 Learning Path
|
||||
|
||||
We recommend following the examples in order:
|
||||
|
||||
1. **Start with "Hello AI World"** - Learn the basics of pattern recognition
|
||||
2. **Build a Simple Neural Network** - Understand how neural networks work
|
||||
3. **Try the Image Classifier** - See AI in action with real images
|
||||
4. **Analyze Text Sentiment** - Explore natural language processing
|
||||
|
||||
## 💡 Tips for Beginners
|
||||
|
||||
- **Read the code comments carefully** - They explain what each line does
|
||||
- **Experiment!** - Try changing values and see what happens
|
||||
- **Don't worry about understanding everything** - Learning takes time
|
||||
- **Ask questions** - Use the [Discussion board](https://github.com/microsoft/AI-For-Beginners/discussions)
|
||||
|
||||
## 🔗 Next Steps
|
||||
|
||||
After completing these examples, explore the full curriculum:
|
||||
- [Introduction to AI](../lessons/1-Intro/README.md)
|
||||
- [Neural Networks](../lessons/3-NeuralNetworks/README.md)
|
||||
- [Computer Vision](../lessons/4-ComputerVision/README.md)
|
||||
- [Natural Language Processing](../lessons/5-NLP/README.md)
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
Found these examples helpful? Help us improve them:
|
||||
- Report issues or suggest improvements
|
||||
- Add more examples for beginners
|
||||
- Improve documentation and comments
|
||||
|
||||
---
|
||||
|
||||
*Remember: Every expert was once a beginner. Happy learning! 🎓*
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>AI for Beginners</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="icon" type="image/png" href="images/favicon.png">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: 'AI for Beginners',
|
||||
repo: 'https://github.com/Microsoft/AI-For-Beginners',
|
||||
relativePath: true,
|
||||
auto2top: true,
|
||||
routerMode: 'history'
|
||||
}
|
||||
</script>
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
# For Educators
|
||||
|
||||
Would you like to use this curriculum in your classroom? Please feel free!
|
||||
|
||||
In fact, you can use it within GitHub itself by using GitHub Classroom.
|
||||
|
||||
To do that, fork this repo. You are going to need to create a repo for each lesson, so you're going to need to extract each folder into a separate repo. That way, [GitHub Classroom](https://classroom.github.com/classrooms) can pick up each lesson separately.
|
||||
|
||||
These [full instructions](https://github.blog/2020-03-18-set-up-your-digital-classroom-with-github-classroom/) will give you an idea how to set up your classroom.
|
||||
|
||||
## Using the repo as is
|
||||
|
||||
If you would like to use this repo as it currently stands, without using GitHub Classroom, that can be done as well. You would need to communicate with your students which lesson to work through together.
|
||||
|
||||
In an online format (Zoom, Teams, or other) you might form breakout rooms for the quizzes, and mentor students to help them get ready to learn. Then invite students to for the quizzes and submit their answers as 'issues' at a certain time. You might do the same with assignments, if you want students to work collaboratively out in the open.
|
||||
|
||||
If you prefer a more private format, ask your students to fork the curriculum, lesson by lesson, to their own GitHub repos as private repos, and give you access. Then they can complete quizzes and assignments privately and submit them to you via issues on your classroom repo.
|
||||
|
||||
There are many ways to make this work in an online classroom format. Please let us know what works best for you!
|
||||
|
||||
## Please give us your thoughts
|
||||
|
||||
We want to make this curriculum work for you and your students. Please give us feedback in the discussion boards!
|
||||
@@ -0,0 +1,64 @@
|
||||
# How to Run the Code
|
||||
|
||||
This curriculum contains a lot of executable examples and labs that you would want to run. In order to do this, you need the ability to execute Python code in Jupyter Notebooks provided as part of this curriculum. You have several options for running the code:
|
||||
|
||||
## Run locally on your computer
|
||||
|
||||
To run the code locally on your computer, a Python installation is needed. One recommendation is to install **[miniconda](https://conda.io/en/latest/miniconda.html)** - it is a rather lightweight installation that supports the `conda` package manager for different Python **virtual environments**.
|
||||
|
||||
After you install miniconda, clone the repository and create a virtual environment to be used for this course:
|
||||
|
||||
```bash
|
||||
git clone http://github.com/microsoft/ai-for-beginners
|
||||
cd ai-for-beginners
|
||||
conda env create --name ai4beg --file .devcontainer/environment.yml
|
||||
conda activate ai4beg
|
||||
```
|
||||
|
||||
### Using Visual Studio Code with Python Extension
|
||||
|
||||
This curriculum is best used when opening it in [Visual Studio Code](http://code.visualstudio.com/?WT.mc_id=academic-77998-cacaste) with [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python&WT.mc_id=academic-77998-cacaste).
|
||||
|
||||
> **Note**: Once you clone and open the directory in VS Code, it will automatically suggest you to install Python extensions. You would also have to install miniconda as described above.
|
||||
|
||||
> **Note**: If VS Code suggests to you to re-open the repository in a container, you should decline this to use the local Python installation.
|
||||
|
||||
### Using Jupyter in the Browser
|
||||
|
||||
You can also use a Jupyter environment from the browser on your own computer. Both classical Jupyter and JupyterHub provide a convenient development environment with auto-completion, code highlighting, etc.
|
||||
|
||||
To start Jupyter locally, go to the directory of the course, and execute:
|
||||
|
||||
```bash
|
||||
jupyter notebook
|
||||
```
|
||||
or
|
||||
```bash
|
||||
jupyterhub
|
||||
```
|
||||
You then can navigate to any of the `.ipynb` files, open them and start working.
|
||||
|
||||
### Running in container
|
||||
|
||||
One alternative to Python installation would be to run the code in a container. Since our repository supplies a special `.devcontainer` folder that instructs how to build a container for this repo, VS Code offers the opportunity to re-open the code in a container. This will require Docker installation, and also would be more complex, so we recommend this to more experienced users.
|
||||
|
||||
## Running in the Cloud
|
||||
|
||||
If you do not want to install Python locally, and have access to some cloud resources - a good alternative would be to run the code in the cloud. There are several ways you can do this:
|
||||
|
||||
* Using **[GitHub Codespaces](https://github.com/features/codespaces)**, which is a virtual environment created for you on GitHub, accessible through a VS Code browser interface. If you have access to Codespaces, you can just click the **Code** button in the repo, start a codespace, and get running in no time.
|
||||
* Using **[Binder](https://mybinder.org/v2/gh/microsoft/ai-for-beginners/HEAD)**. [Binder](https://mybinder.org) offers free computing resources provided in the cloud for people like you to test out some code on GitHub. There is a button at the front page to open the repository in Binder - this should quickly take you to the binder site, which will build an underlying container and start a Jupyter web interface for you seamlessly.
|
||||
|
||||
> **Note**: To prevent misuse, Binder has access to some web resources blocked. This may prevent some of the code from working, which fetches models and/or datasets from the public Internet. You may need to find some workarounds. Also, compute resources provided by Binder are pretty basic, so training will be slow, especially in later, more complex lessons.
|
||||
|
||||
## Running in the Cloud with GPU
|
||||
|
||||
Some of the later lessons in this curriculum would greatly benefit from GPU support. Model training, for instance, can be painfully slow otherwise. There are a few options you can follow, especially if you have access to the cloud either through [Azure for Students](https://azure.microsoft.com/free/students/?WT.mc_id=academic-77998-cacaste), or through your institution:
|
||||
|
||||
* Create [Data Science Virtual Machine](https://docs.microsoft.com/learn/modules/intro-to-azure-data-science-virtual-machine/?WT.mc_id=academic-77998-cacaste) and connect to it through Jupyter. You can then clone the repo right onto the machine, and start learning. NC-series VMs have GPU support.
|
||||
|
||||
> **Note**: Some subscriptions, including Azure for Students, do not provide GPU support out of the box. You may need to request additional GPU cores with a technical support request.
|
||||
|
||||
* Create [Azure Machine Learning Workspace](https://azure.microsoft.com/services/machine-learning/?WT.mc_id=academic-77998-cacaste) and then use the Notebook feature there. [This video](https://azure-for-academics.github.io/quickstart/azureml-papers/) shows how to clone a repository into Azure ML notebook and start using it.
|
||||
|
||||
You can also use Google Colab, which comes with some free GPU support, and upload Jupyter Notebooks there to execute them one-by-one.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Getting Started with this Curricula
|
||||
|
||||
## Are you a student?
|
||||
|
||||
Get started with the following resources:
|
||||
|
||||
* [Student Hub page](https://docs.microsoft.com/learn/student-hub?WT.mc_id=academic-77998-cacaste) On this page, you will find beginner resources, Student packs, and even ways to get a free cert voucher. This is one page you want to bookmark and check from time to time as we switch out content at least monthly.
|
||||
* [Microsoft Student Learn ambassadors](https://studentambassadors.microsoft.com?WT.mc_id=academic-77998-cacaste) Join a global community of student ambassadors, this could be your way into Microsoft.
|
||||
|
||||
**Students**, there are a couple of ways to use the curriculum. First of all, you can just read the text and look through the code directly on GitHub. If you want to run the code in any of the notebooks - [read our instructions](./how-to-run.md), and find more advice on how to do it [in this blog post](https://soshnikov.com/education/how-to-execute-notebooks-from-github/).
|
||||
|
||||
> **Note**: [Instructions on how to run the code in this curriculum](./how-to-run.md)
|
||||
|
||||
## Self Study
|
||||
|
||||
However, if you would like to take the course as a self-study project, we suggest that you fork the entire repo to your own GitHub account and complete the exercises on your own or with a group:
|
||||
|
||||
* Start with a pre-lecture quiz.
|
||||
* Read the intro text for the lecture.
|
||||
* If the lecture has additional notebooks, go through them, reading and executing the code. If both TensorFlow and PyTorch notebooks are provided, you can focus on one of them - choose your favorite framework.
|
||||
* Notebooks often contain some of the challenges that require you to tweak the code a little bit to experiment.
|
||||
* Take the post-lecture quiz.
|
||||
* If there is a lab attached to the module - complete the assignment.
|
||||
* Visit the [Discussion board](https://github.com/microsoft/AI-For-Beginners/discussions) to "learn out loud".
|
||||
|
||||
> For further study, we recommend following these [Microsoft Learn](https://docs.microsoft.com/en-us/users/dmitrysoshnikov-9132/collections/31zgizg2p418yo/?WT.mc_id=academic-77998-cacaste) modules and learning paths.
|
||||
|
||||
**Teachers**, we have [included some suggestions](./for-teachers.md) on how to use this curriculum.
|
||||
|
||||
---
|
||||
|
||||
## Pedagogy
|
||||
|
||||
We have chosen two pedagogical tenets while building this curriculum: ensuring that it is hands-on **project-based** and that it includes **frequent quizzes**.
|
||||
|
||||
By ensuring that the content aligns with projects, the process is made more engaging for students and retention of concepts will be augmented. In addition, a low-stakes quiz before a class sets the intention of the student towards learning a topic, while a second quiz after class ensures further retention. This curriculum was designed to be flexible and fun and can be taken in whole or in part. The projects start small and become increasingly complex by the end of the 12-week cycle.
|
||||
|
||||
> **A note about quizzes**: All quizzes are contained [in this app](https://red-field-0a6ddfd03.1.azurestaticapps.net/), for 50 total quizzes of three questions each. They are linked from within the lessons but the quiz app can be run locally; follow the instructions in the `etc/quiz-app` folder.
|
||||
|
||||
## Offline access
|
||||
|
||||
You can run this documentation offline by using [Docsify](https://docsify.js.org/#/). Fork this repo, [install Docsify](https://docsify.js.org/#/quickstart) on your local machine, and then in the root folder of this repo, type `docsify serve`. The website will be served on port 3000 on your localhost: `localhost:3000`. A pdf of the curriculum is available [at this link](/etc/pdf/readme.pdf).
|
||||
@@ -0,0 +1,154 @@
|
||||
# Introduction to AI
|
||||
|
||||

|
||||
|
||||
> Sketchnote by [Tomomi Imura](https://twitter.com/girlie_mac)
|
||||
|
||||
## [Pre-lecture quiz](https://ff-quizzes.netlify.app/en/ai/quiz/1)
|
||||
|
||||
**Artificial Intelligence** is an exciting scientific discipline that studies how we can make computers exhibit intelligent behavior, e.g. do those things that human beings are good at doing.
|
||||
|
||||
Originally, computers were invented by [Charles Babbage](https://en.wikipedia.org/wiki/Charles_Babbage) to operate on numbers following a well-defined procedure - an algorithm. Modern computers, even though significantly more advanced than the original model proposed in the 19th century, still follow the same idea of controlled computations. Thus it is possible to program a computer to do something if we know the exact sequence of steps that we need to do in order to achieve the goal.
|
||||
|
||||

|
||||
|
||||
> Photo by [Vickie Soshnikova](http://twitter.com/vickievalerie)
|
||||
|
||||
> ✅ Defining the age of a person from his or her photograph is a task that cannot be explicitly programmed, because we do not know how we come up with a number inside our head when we do it.
|
||||
|
||||
---
|
||||
|
||||
There are some tasks, however, that we do not explicitly know how to solve. Consider determining the age of a person from his/her photograph. We somehow learn to do it, because we have seen many examples of people of different age, but we cannot explicitly explain how we do it, nor can we program the computer to do it. This is exactly the kind of task that are of interest to **Artificial Intelligence** (AI for short).
|
||||
|
||||
✅ Think of some tasks that you could offload to a computer that would benefit from AI. Consider the fields of finance, medicine, and the arts - how are these fields benefiting today from AI?
|
||||
|
||||
## Weak AI vs. Strong AI
|
||||
|
||||
Weak AI | Strong AI
|
||||
---------------------------------------|-------------------------------------
|
||||
Weak AI refers to AI systems that are designed and trained for a specific task or a narrow set of tasks.|Strong AI, or Artificial General Intelligence (AGI), refers to AI systems with human-level intelligence and understanding.
|
||||
These AI systems are not generally intelligent; they excel in performing a predefined task but lack true understanding or consciousness.|These AI systems have the ability to perform any intellectual task that a human being can do, adapt to different domains, and possess a form of consciousness or self-awareness.
|
||||
Examples of weak AI include virtual assistants like Siri or Alexa, recommendation algorithms used by streaming services, and chatbots that are designed for specific customer service tasks.|Achieving Strong AI is a long-term goal of AI research and would require the development of AI systems that can reason, learn, understand, and adapt across a wide range of tasks and contexts.
|
||||
Weak AI is highly specialized and does not possess human-like cognitive abilities or general problem-solving capabilities beyond its narrow domain.|Strong AI is currently a theoretical concept, and no AI system has reached this level of general intelligence.
|
||||
|
||||
For more infomation refer to **[Artificial General Intelligence](https://en.wikipedia.org/wiki/Artificial_general_intelligence)** (AGI).
|
||||
## The Definition of Intelligence and the Turing Test
|
||||
|
||||
One of the problems when dealing with the term **[Intelligence](https://en.wikipedia.org/wiki/Intelligence)** is that there is no clear definition of this term. One can argue that intelligence is connected to **abstract thinking**, or to **self-awareness**, but we cannot properly define it.
|
||||
|
||||

|
||||
|
||||
> [Photo](https://unsplash.com/photos/75715CVEJhI) by [Amber Kipp](https://unsplash.com/@sadmax) from Unsplash
|
||||
|
||||
To see the ambiguity of a term *intelligence*, try answering a question: "Is a cat intelligent?". Different people tend to give different answers to this question, as there is no universally accepted test to prove the assertion is true or not. And if you think there is - try running your cat through an IQ test...
|
||||
|
||||
✅ Think for a minute about how you define intelligence. Is a crow who can solve a maze and get at some food intelligent? Is a child intelligent?
|
||||
|
||||
---
|
||||
|
||||
When speaking about AGI we need to have some way to tell if we have created a truly intelligent system. [Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing) proposed a way called a **[Turing Test](https://en.wikipedia.org/wiki/Turing_test)**, which also acts like a definition of intelligence. The test compares a given system to something inherently intelligent - a real human being, and because any automatic comparison can be bypassed by a computer program, we use a human interrogator. So, if a human being is unable to distinguish between a real person and a computer system in text-based dialogue - the system is considered intelligent.
|
||||
|
||||
> A chat-bot called [Eugene Goostman](https://en.wikipedia.org/wiki/Eugene_Goostman), developed in St.Petersburg, came close to passing the Turing test in 2014 by using a clever personality trick. It announced up front that it was a 13-year old Ukrainian boy, which would explain the lack of knowledge and some discrepancies in the text. The bot convinced 30% of the judges that it was human after a 5 minute dialogue, a metric that Turing believed a machine would be able to pass by 2000. However, one should understand that this does not indicate that we have created an intelligent system, or that a computer system has fooled the human interrogator - the system didn't fool the humans, but rather the bot creators did!
|
||||
|
||||
✅ Have you ever been fooled by a chat bot into thinking that you are speaking to a human? How did it convince you?
|
||||
|
||||
## Different Approaches to AI
|
||||
|
||||
If we want a computer to behave like a human, we need somehow to model inside a computer our way of thinking. Consequently, we need to try to understand what makes a human being intelligent.
|
||||
|
||||
> To be able to program intelligence into a machine, we need to understand how our own processes of making decisions work. If you do a little self-introspection, you will realize that there are some processes that happen subconsciously – eg. we can distinguish a cat from a dog without thinking about it - while some others involve reasoning.
|
||||
|
||||
There are two possible approaches to this problem:
|
||||
|
||||
Top-down Approach (Symbolic Reasoning) | Bottom-up Approach (Neural Networks)
|
||||
---------------------------------------|-------------------------------------
|
||||
A top-down approach models the way a person reasons to solve a problem. It involves extracting **knowledge** from a human being, and representing it in a computer-readable form. We also need to develop a way to model **reasoning** inside a computer. | A bottom-up approach models the structure of a human brain, consisting of a huge number of simple units called **neurons**. Each neuron acts like a weighted average of its inputs, and we can train a network of neurons to solve useful problems by providing **training data**.
|
||||
|
||||
There are also some other possible approaches to intelligence:
|
||||
|
||||
* An **Emergent**, **Synergetic** or **multi-agent approach** are based on the fact that complex intelligent behaviour can be obtained by an interaction of a large number of simple agents. According to [evolutionary cybernetics](https://en.wikipedia.org/wiki/Global_brain#Evolutionary_cybernetics), intelligence can *emerge* from more simple, reactive behaviour in the process of *metasystem transition*.
|
||||
|
||||
* An **Evolutionary approach**, or **genetic algorithm** is an optimization process based on the principles of evolution.
|
||||
|
||||
We will consider those approaches later in the course, but right now we will focus on two main directions: top-down and bottom-up.
|
||||
|
||||
### The Top-Down Approach
|
||||
|
||||
In a **top-down approach**, we try to model our reasoning. Because we can follow our thoughts when we reason, we can try to formalize this process and program it inside the computer. This is called **symbolic reasoning**.
|
||||
|
||||
People tend to have some rules in their head that guide their decision making processes. For example, when a doctor is diagnosing a patient, he or she may realize that a person has a fever, and thus there might be some inflammation going on inside the body. By applying a large set of rules to a specific problem a doctor may be able to come up with the final diagnosis.
|
||||
|
||||
This approach relies heavily on **knowledge representation** and **reasoning**. Extracting knowledge from a human expert might be the most difficult part, because a doctor in many cases would not know exactly why he or she is coming up with a particular diagnosis. Sometimes the solution just comes up in his or her head without explicit thinking. Some tasks, such as determining the age of a person from a photograph, cannot be at all reduced to manipulating knowledge.
|
||||
|
||||
### Bottom-Up Approach
|
||||
|
||||
Alternately, we can try to model the simplest elements inside our brain – a neuron. We can construct a so-called **artificial neural network** inside a computer, and then try to teach it to solve problems by giving it examples. This process is similar to how a newborn child learns about his or her surroundings by making observations.
|
||||
|
||||
✅ Do a little research on how babies learn. What are the basic elements of a baby's brain?
|
||||
|
||||
> | What about ML? | |
|
||||
> |--------------|-----------|
|
||||
> | Part of Artificial Intelligence that is based on computer learning to solve a problem based on some data is called **Machine Learning**. We will not consider classical machine learning in this course - we refer you to a separate [Machine Learning for Beginners](http://aka.ms/ml-beginners) curriculum. |  |
|
||||
|
||||
## A Brief History of AI
|
||||
|
||||
Artificial Intelligence was started as a field in the middle of the twentieth century. Initially, symbolic reasoning was a prevalent approach, and it led to a number of important successes, such as expert systems – computer programs that were able to act as an expert in some limited problem domains. However, it soon became clear that such approach does not scale well. Extracting the knowledge from an expert, representing it in a computer, and keeping that knowledgebase accurate turns out to be a very complex task, and too expensive to be practical in many cases. This led to so-called [AI Winter](https://en.wikipedia.org/wiki/AI_winter) in the 1970s.
|
||||
|
||||
<img alt="Brief History of AI" src="images/history-of-ai.png" width="70%"/>
|
||||
|
||||
> Image by [Dmitry Soshnikov](http://soshnikov.com)
|
||||
|
||||
As time passed, computing resources became cheaper, and more data has become available, so neural network approaches started demonstrating great performance in competing with human beings in many areas, such as computer vision or speech understanding. In the last decade, the term Artificial Intelligence has been mostly used as a synonym for Neural Networks, because most of the AI successes that we hear about are based on them.
|
||||
|
||||
We can observe how the approaches changed, for example, in creating a chess playing computer program:
|
||||
|
||||
* Early chess programs were based on search – a program explicitly tried to estimate possible moves of an opponent for a given number of next moves, and selected an optimal move based on the optimal position that can be achieved in a few moves. It led to the development of the so-called [alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning) search algorithm.
|
||||
* Search strategies work well toward the end of the game, where the search space is limited by a small number of possible moves. However, at the beginning of the game, the search space is huge, and the algorithm can be improved by learning from existing matches between human players. Subsequent experiments employed so-called [case-based reasoning](https://en.wikipedia.org/wiki/Case-based_reasoning), where the program looked for cases in the knowledge base very similar to the current position in the game.
|
||||
* Modern programs that win over human players are based on neural networks and [reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning), where the programs learn to play solely by playing a long time against themselves and learning from their own mistakes – much like human beings do when learning to play chess. However, a computer program can play many more games in much less time, and thus can learn much faster.
|
||||
|
||||
✅ Do a little research on other games that have been played by AI.
|
||||
|
||||
Similarly, we can see how the approach towards creating “talking programs” (that might pass the Turing test) changed:
|
||||
|
||||
* Early programs of this kind such as [Eliza](https://en.wikipedia.org/wiki/ELIZA), were based on very simple grammatical rules and the re-formulation of the input sentence into a question.
|
||||
* Modern assistants, such as Cortana, Siri or Google Assistant are all hybrid systems that use Neural networks to convert speech into text and recognize our intent, and then employ some reasoning or explicit algorithms to perform required actions.
|
||||
* In the future, we may expect a complete neural-based model to handle dialogue by itself. The recent GPT and [Turing-NLG](https://www.microsoft.com/research/blog/turing-nlg-a-17-billion-parameter-language-model-by-microsoft) family of neural networks show great success in this.
|
||||
|
||||
<img alt="the Turing test's evolution" src="images/turing-test-evol.png" width="70%"/>
|
||||
|
||||
> Image by Dmitry Soshnikov, [photo](https://unsplash.com/photos/r8LmVbUKgns) by [Marina Abrosimova](https://unsplash.com/@abrosimova_marina_foto), Unsplash
|
||||
|
||||
## Recent AI Research
|
||||
|
||||
The huge recent growth in neural network research started around 2010, when large public datasets started to become available. A huge collection of images called [ImageNet](https://en.wikipedia.org/wiki/ImageNet), which contains around 14 million annotated images, gave birth to the [ImageNet Large Scale Visual Recognition Challenge](https://image-net.org/challenges/LSVRC/).
|
||||
|
||||

|
||||
|
||||
> Image by [Dmitry Soshnikov](http://soshnikov.com)
|
||||
|
||||
In 2012, [Convolutional Neural Networks](../4-ComputerVision/07-ConvNets/README.md) were first used in image classification, which led to a significant drop in classification errors (from almost 30% to 16.4%). In 2015, ResNet architecture from Microsoft Research [achieved human-level accuracy](https://doi.org/10.1109/ICCV.2015.123).
|
||||
|
||||
Since then, Neural Networks demonstrated very successful behaviour in many tasks:
|
||||
|
||||
---
|
||||
|
||||
Year | Human Parity achieved
|
||||
-----|--------
|
||||
2015 | [Image Classification](https://doi.org/10.1109/ICCV.2015.123)
|
||||
2016 | [Conversational Speech Recognition](https://arxiv.org/abs/1610.05256)
|
||||
2018 | [Automatic Machine Translation](https://arxiv.org/abs/1803.05567) (Chinese-to-English)
|
||||
2020 | [Image Captioning](https://arxiv.org/abs/2009.13682)
|
||||
|
||||
Over the past few years we have witnessed huge successes with large language models, such as BERT and GPT-3. This happened mostly due to the fact that there is a lot of general text data available that allows us to train models to capture the structure and meaning of texts, pre-train them on general text collections, and then specialize those models for more specific tasks. We will learn more about [Natural Language Processing](../5-NLP/README.md) later in this course.
|
||||
|
||||
## 🚀 Challenge
|
||||
|
||||
Do a tour of the internet to determine where, in your opinion, AI is most effectively used. Is it in a Mapping app, or some speech-to-text service or a video game? Research how the system was built.
|
||||
|
||||
## [Post-lecture quiz](https://ff-quizzes.netlify.app/en/ai/quiz/2)
|
||||
|
||||
## Review & Self Study
|
||||
|
||||
Review the history of AI and ML by reading through [this lesson](https://github.com/microsoft/ML-For-Beginners/tree/main/1-Introduction/2-history-of-ML). Take an element from the sketchnote at the top of that lesson or this one and research it in more depth to understand the cultural context informing its evolution.
|
||||
|
||||
**Assignment**: [Game Jam](assignment.md)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Game Jam
|
||||
|
||||
Games are an area that have been heavily influenced by developments in AI and ML. In this assignment, write a short paper on a game that you like that has been influenced by the evolution of AI. It should be an old enough game to have been influenced by several types of computer processing systems. A good example is Chess or Go, but also take a look at video games like pong or Pac-Man. Write an essay that discusses the game's past, present, and AI future.
|
||||
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,148 @@
|
||||
# AI入門と基礎知識
|
||||
|
||||

|
||||
|
||||
> Sketchnote by [Tomomi Imura](https://twitter.com/girlie_mac)
|
||||
|
||||
## [事前クイズ](https://ff-quizzes.netlify.app/en/ai/quiz/1)
|
||||
|
||||
**Artificial Intelligence** is an exciting scientific discipline that studies how we can make computers exhibit intelligent behavior, e.g. do those things that human beings are good at doing.
|
||||
|
||||
Originally, computers were invented by [Charles Babbage](https://en.wikipedia.org/wiki/Charles_Babbage) to operate on numbers following a well-defined procedure - an algorithm. Modern computers, even though significantly more advanced than the original model proposed in the 19th century, still follow the same idea of controlled computations. Thus it is possible to program a computer to do something if we know the exact sequence of steps that we need to do in order to achieve the goal.
|
||||
|
||||

|
||||
|
||||
> Photo by [Vickie Soshnikova](http://twitter.com/vickievalerie)
|
||||
|
||||
> ✅ Defining the age of a person from his or her photograph is a task that cannot be explicitly programmed, because we do not know how we come up with a number inside our head when we do it.
|
||||
|
||||
---
|
||||
|
||||
There are some tasks, however, that we do not explicitly know how to solve. Consider determining the age of a person from his/her photograph. We somehow learn to do it, because we have seen many examples of people of different age, but we cannot explicitly explain how we do it, nor can we program the computer to do it. This is exactly the kind of task that are of interest to **Artificial Intelligence** (AI for short).
|
||||
|
||||
✅ Think of some tasks that you could offload to a computer that would benefit from AI. Consider the fields of finance, medicine, and the arts - how are these fields benefiting today from AI?
|
||||
|
||||
## Weak AI と Strong AI の比較
|
||||
|
||||
The task of solving a specific human-like problem, such as determining a person's age from a photo, can be called **Weak AI**, because we are creating a system for only one task, and not a system that can solve many tasks, such as can be done by a human being. Of course, developing a generally intelligent computer system is also extremely interesting from many points of view, including for students of the philosophy of consciousness. Such system would be called **Strong AI**, or **[Artificial General Intelligence](https://en.wikipedia.org/wiki/Artificial_general_intelligence)** (AGI).
|
||||
|
||||
## 知能の定義とチューリングテスト
|
||||
|
||||
One of the problems when dealing with the term **[Intelligence](https://en.wikipedia.org/wiki/Intelligence)** is that there is no clear definition of this term. One can argue that intelligence is connected to **abstract thinking**, or to **self-awareness**, but we cannot properly define it.
|
||||
|
||||

|
||||
|
||||
> [Photo](https://unsplash.com/photos/75715CVEJhI) by [Amber Kipp](https://unsplash.com/@sadmax) from Unsplash
|
||||
|
||||
To see the ambiguity of a term *intelligence*, try answering a question: "Is a cat intelligent?". Different people tend to give different answers to this question, as there is no universally accepted test to prove the assertion true or not. And if you think there is - try running your cat through an IQ test...
|
||||
|
||||
✅ Think for a minute about how you define intelligence. Is a crow who can solve a maze and get at some food intelligent? Is a child intelligent?
|
||||
|
||||
---
|
||||
|
||||
When speaking about AGI we need to have some way to tell if we have created a truly intelligent system. [Alan Turing](https://en.wikipedia.org/wiki/Alan_Turing) proposed a way called a **[Turing Test](https://en.wikipedia.org/wiki/Turing_test)**, which also acts like a definition of intelligence. The test compares a given system to something inherently intelligent - a real human being, and because any automatic comparison can be bypassed by a computer program, we use a human interrogator. So, if a human being is unable to distinguish between a real person and a computer system in text-based dialogue - the system is considered intelligent.
|
||||
|
||||
> A chat-bot called [Eugene Goostman](https://en.wikipedia.org/wiki/Eugene_Goostman), developed in St.Petersburg, came close to passing the Turing test in 2014 by using a clever personality trick. It announced up front that it was a 13-year old Ukrainian boy, which would explain the lack of knowledge and some discrepancies in the text. The bot convinced 30% of the judges that it was human after a 5 minute dialogue, a metric that Turing believed a machine would be able to pass by 2000. However, one should understand that this does not indicate that we have created an intelligent system, or that a computer system has fooled the human interrogator - the system didn't fool the humans, but rather the bot creators did!
|
||||
|
||||
✅ Have you ever been fooled by a chat bot into thinking that you are speaking to a human? How did it convince you?
|
||||
|
||||
## AIへのさまざまなアプローチ
|
||||
|
||||
If we want a computer to behave like a human, we need somehow to model inside a computer our way of thinking. Consequently, we need to try to understand what makes a human being intelligent.
|
||||
|
||||
> To be able to program intelligence into a machine, we need to understand how our own processes of making decisions work. If you do a little self-introspection, you will realize that there are some processes that happen subconsciously – eg. we can distinguish a cat from a dog without thinking about it - while some others involve reasoning.
|
||||
|
||||
There are two possible approaches to this problem:
|
||||
|
||||
Top-down Approach (Symbolic Reasoning) | Bottom-up Approach (Neural Networks)
|
||||
---------------------------------------|-------------------------------------
|
||||
A top-down approach models the way a person reasons to solve a problem. It involves extracting **knowledge** from a human being, and representing it in a computer-readable form. We also need to develop a way to model **reasoning** inside a computer. | A bottom-up approach models the structure of a human brain, consisting of huge number of simple units called **neurons**. Each neuron acts like a weighted average of its inputs, and we can train a network of neurons to solve useful problems by providing **training data**.
|
||||
|
||||
There are also some other possible approaches to intelligence:
|
||||
|
||||
* An **Emergent**, **Synergetic** or **multi-agent approach** are based on the fact that complex intelligent behaviour can be obtained by an interaction of a large number of simple agents. According to [evolutionary cybernetics](https://en.wikipedia.org/wiki/Global_brain#Evolutionary_cybernetics), intelligence can *emerge* from more simple, reactive behaviour in the process of *metasystem transition*.
|
||||
|
||||
* An **Evolutionary approach**, or **genetic algorithm** is an optimization process based on the principles of evolution.
|
||||
|
||||
We will consider those approaches later in the course, but right now we will focus on two main directions: top-down and bottom-up.
|
||||
|
||||
### トップダウン・アプローチ
|
||||
|
||||
In a **top-down approach**, we try to model our reasoning. Because we can follow our thoughts when we reason, we can try to formalize this process and program it inside the computer. This is called **symbolic reasoning**.
|
||||
|
||||
People tend to have some rules in their head that guide their decision making processes. For example, when a doctor is diagnosing a patient, he or she may realize that a person has a fever, and thus there might be some inflammation going on inside the body. By applying a large set of rules to a specific problem a doctor may be able to come up with the final diagnosis.
|
||||
|
||||
This approach relies heavily on **knowledge representation** and **reasoning**. Extracting knowledge from a human expert might be the most difficult part, because a doctor in many cases would not know exactly why he or she is coming up with a particular diagnosis. Sometimes the solution just comes up in his or her head without explicit thinking. Some tasks, such as determining the age of a person from a photograph, cannot be at all reduced to manipulating knowledge.
|
||||
|
||||
### ボトムアップ・アプローチ
|
||||
|
||||
Alternately, we can try to model the simplest elements inside our brain – a neuron. We can construct a so-called **artificial neural network** inside a computer, and then try to teach it to solve problems by giving it examples. This process is similar to how a newborn child learns about his or her surroundings by making observations.
|
||||
|
||||
✅ Do a little research on how babies learn. What are the basic elements of a baby's brain?
|
||||
|
||||
> | What about ML? | |
|
||||
> |--------------|-----------|
|
||||
> | Part of Artificial Intelligence that is based on computer learning to solve a problem based on some data is called **Machine Learning**. We will not consider classical machine learning in this course - we refer you to a separate [Machine Learning for Beginners](http://aka.ms/ml-beginners) curriculum. |  |
|
||||
|
||||
## AIの歴史
|
||||
|
||||
Artificial Intelligence was started as a field in the middle of the twentieth century. Initially symbolic reasoning was a prevalent approach, and it led to a number of important successes, such as expert systems – computer programs that were able to act as an expert in some limited problem domain. However, it soon became clear that such approach does not scale well. Extracting the knowledge from an expert, representing it in a computer, and keeping that knowledgebase accurate turns out to be a very complex task, and too expensive to be practical in many cases. This led to so-called [AI Winter](https://en.wikipedia.org/wiki/AI_winter) in the 1970s.
|
||||
|
||||
<img alt="Brief History of AI" src="images/history-of-ai.png" width="70%"/>
|
||||
|
||||
> Image by [Dmitry Soshnikov](http://soshnikov.com)
|
||||
|
||||
As time passed, computing resources became cheaper, and more data has become available, so neural network approaches started demonstrating great performance in competing with human beings in many areas, such as computer vision or speech understanding. In the last decade, the term Artificial Intelligence has been mostly used as a synonym for Neural Networks, because most of the AI successes that we hear about are based on them.
|
||||
|
||||
We can observe how the approaches changed, for example, in creating a chess playing computer program:
|
||||
|
||||
* Early chess programs were based on search – a program explicitly tried to estimate possible moves of an opponent for a given number of next moves, and selected an optimal move based on the optimal position that can be achieved in a few moves. It led to the development of the so-called [alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning) search algorithm.
|
||||
* Search strategies work well towards the end of the game, where the search space is limited by a small number of possible moves. However, in the beginning of the game the search space is huge, and the algorithm can be improved by learning from existing matches between human players. Subsequent experiments employed so-called [case-based reasoning](https://en.wikipedia.org/wiki/Case-based_reasoning), where the program looked for cases in the knowledge base very similar to the current position in the game.
|
||||
* Modern programs that win over human players are based on neural networks and [reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning), where the programs learn to play solely by playing a long time against itself and learning from its own mistakes – much like human beings do when learning to play chess. However, a computer program can play many more games in much less time, and thus can learn much faster.
|
||||
|
||||
✅ Do a little research on other games that have been played by AI.
|
||||
|
||||
Similarly, we can see how the approach towards creating “talking programs” (that might pass the Turing test) changed:
|
||||
|
||||
* Early programs of this kind such as [Eliza](https://en.wikipedia.org/wiki/ELIZA), were based on very simple grammatical rules and the re-formulation of the input sentence into a question.
|
||||
* Modern assistants, such as Cortana, Siri or Google Assistant are all hybrid systems that use Neural networks to convert speech into text and to recognize our intent, and then employ some reasoning or explicit algorithms to perform required actions.
|
||||
* In the future, we may expect complete neural-based model to handle dialogue by itself. The recent GPT and [Turing-NLG](https://turing.microsoft.com/) family of neural networks show great success in this.
|
||||
|
||||
<img alt="the Turing test's evolution" src="images/turing-test-evol.png" width="70%"/>
|
||||
|
||||
> Image by Dmitry Soshnikov, [photo](https://unsplash.com/photos/r8LmVbUKgns) by [Marina Abrosimova](https://unsplash.com/@abrosimova_marina_foto), Unsplash
|
||||
|
||||
## 最新のAI研究
|
||||
|
||||
The huge recent growth in neural network research started around 2010, when large public datasets started to become available. A huge collection of images called [ImageNet](https://en.wikipedia.org/wiki/ImageNet), which contains around 14 million annotated images, gave birth to the [ImageNet Large Scale Visual Recognition Challenge](https://image-net.org/challenges/LSVRC/).
|
||||
|
||||

|
||||
|
||||
> Image by [Dmitry Soshnikov](http://soshnikov.com)
|
||||
|
||||
In 2012, [Convolutional Neural Networks](../4-ComputerVision/07-ConvNets/README.md) were first used in image classification, which led to a significant drop in classification errors (from almost 30% to 16.4%). In 2015, ResNet architecture from Microsoft Research [achieved human-level accuracy](https://doi.org/10.1109/ICCV.2015.123).
|
||||
|
||||
Since then, Neural Networks demonstrated very successful behaviour in many tasks:
|
||||
|
||||
---
|
||||
|
||||
Year | Human Parity achieved
|
||||
-----|--------
|
||||
2015 | [Image Classification](https://doi.org/10.1109/ICCV.2015.123)
|
||||
2016 | [Conversational Speech Recognition](https://arxiv.org/abs/1610.05256)
|
||||
2018 | [Automatic Machine Translation](https://arxiv.org/abs/1803.05567) (Chinese-to-English)
|
||||
2020 | [Image Captioning](https://arxiv.org/abs/2009.13682)
|
||||
|
||||
Over the past few years we have witnessed huge successes with large language models, such as BERT and GPT-3. This happen happened mostly due to the fact that there is a lot of general text data available that allows us to train models to capture the structure and meaning of texts, pre-train them on general text collections, and then specialize those models for more specific tasks. We will learn more about [Natural Language Processing](../5-NLP/README.md) later in this course.
|
||||
|
||||
## 🚀 挑戦してみよう
|
||||
|
||||
Do a tour of the internet to determine where, in your opinion, AI is most effectively used. Is it in a Mapping app, or some speech-to-text service or a video game? Research how the system was built.
|
||||
|
||||
## [Post-lecture quiz](https://ff-quizzes.netlify.app/en/ai/quiz/2)
|
||||
|
||||
## レビュー&セルフスタディ
|
||||
|
||||
Review the history of AI and ML by reading through [this lesson](https://github.com/microsoft/ML-For-Beginners/tree/main/1-Introduction/2-history-of-ML). Take an element from the sketchnote at the top of that lesson or this one and research it in more depth to understand the cultural context informing its evolution.
|
||||
|
||||
**Assignment**: [Game Jam](assignment.md)
|
||||