CNN Graph を使ってみる(書きかけ)

CNN Graph のインストールについて図解で説明する. Python を使うのが前提である.

先人に感謝.

関連する外部ページ】 Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering https://arxiv.org/abs/1606.09375

GitHub の mdeff/cnn_graph の配布サイト(https://github.com/mdeff/cnn_graph

前準備

Python のインストール(Windows上)

注:既にPython(バージョン3.12を推奨)がインストール済みの場合は,この手順は不要である.

winget(Windowsパッケージマネージャー)を使用してインストールを行う

  1. Windowsで,コマンドプロンプト管理者権限で起動する(例:Windowsキーを押し,「cmd」と入力し,「管理者として実行」を選択)
  2. winget(Windowsパッケージマネージャー)が利用可能か確認する:
    winget --version
    
  3. Pythonのインストール(下のコマンドにより Python 3.12 がインストールされる).
    winget install --scope machine Python.Launcher
    winget install --scope machine Python.Python.3.12
    
  4. 【関連する外部サイト】

    【サイト内の関連ページ】

    Git のインストール

    Git の URL: https://git-scm.com/

    • Windows での Git のインストール: 別ページ »で説明
    • Ubuntu での Git のインストール:

      端末で,次のコマンドを実行

      sudo apt -y update
      sudo apt -y install git
      

    プログラムのダウンロードと展開(解凍)

    GitHub の mdeff/cnn_graph の配布サイト(https://github.com/mdeff/cnn_graph)で公開されている プログラムを,ダウンロードし展開(解凍)する.

    * 以下,Windows での手順を示す.Ubuntu でも同様の手順になる.

    1. GitHub の mdeff/cnn_graph の Web ページを開く.説明を確認

      https://github.com/mdeff/cnn_graph

    2. Windows では,コマンドプロンプトを実行.
    3. ディレクトリ(フォルダ)を空にする操作
      cd c:\pytools
      rmdir /s /q cnn_graph
      
    4. ダウンロード(git を使用)
      git clone https://github.com/mdeff/cnn_graph
      
    5. pip install -r requirements.txt の実行
      E:
      cd c:\pytools
      cd cnn_graph
      pip install -r requirements.txt
      
    6. models.py を次のように書き換え

    usage.ipyrb を実行してみる(書きかけ)

    まず、ディレクトリを移動

    from <ほにゃらら> import ... の「from <ほにゃらら> 」は削除