2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

BERTで行う文章分類 PART1(環境構築編)

Last updated at Posted at 2021-01-25

実行環境

OS:macOS 10.15.7
開発環境:Nova(Python対応テキストエディタならOK)
パッケージのinstall:Anaconda 4.9.2
Python:3.8.3

必要なパッケージ

Pytorchやnltkなどはインストールが必要なので、pipやcondaなどで適宜インストールしてください。
ここでは、以下のライブラリがインストールされているとして話を進めていきます。

import torch
import torch.utils.data
import torch.nn as nn
import numpy as np
import random
import torch.nn.functional as F
from sklearn.model_selection import train_test_split
import pickle
import math
import transformers
from transformers import AutoTokenizer, AutoModel, AutoModelForMaskedLM, BertJapaneseTokenizer
import re
import requests
import unicodedata
import nltk
from nltk.corpus import wordnet
from bs4 import BeautifulSoup

お問い合わせ

内容に関する質問は

mailto:deepblack.inc@gmail.com

までお願いします。

2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?