ubuntuの環境で行う。

git hub cloneのインストールを行う

git clone https://github.com/pomcho555/Patent-VAE

上記リンクに移動し、右の緑色のタブのclone or downloadを開きリンクをコピーする.

  $ git clone https://github.com/pomcho555/Patent-VAE

terminalで上記のものを打ち込む※git clone [コピーしたリンク]

condaの環境を新しく作る

  $ conda create -n vae python=3.6

※vaeが自分で決めた名前

また、一度にインストールできないものを手動で入れる

  $ pip install spacy
  $ python -m spacy download en_core_web_sm
  $ pip install git+https://github.com/tagucci/pythonrouge.git
  $ pip install git+git://github.com/bdusell/rougescore.git

pipのインストールをまとめて行う

  $ pip install -r requirements.txt

Gdriveの小野田さんのフォルダを開き、学習済みデータのactual.pytorchとdata.tar.xzをダウンロードし、Patent-VAEのフォルダに移動する。

※もし自分で学習したい場合はdump.tar.xzをrestoreすることでmongoDBにて特許3万件分のデータが利用できるので、それを使う

api(python server)の起動方法

  $ cd Patent_VAE
  $ cd api
  $ python api.py -z [圧縮したい次元数(今回は2)] -c [保存したモデルのファイル名(今回はactual.pytorch)]

これでapiサーバーがたつ。


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS