Created
December 6, 2021 01:23
-
-
Save RyanKor/515e56808f355400252177612441dbef to your computer and use it in GitHub Desktop.
wanted_env
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import platform | |
%matplotlib inline | |
import matplotlib | |
import tensorflow as tf | |
BATCH_SIZE=6 # 커널이 계속 죽는다.. (메모리 초과...;) -> 배치 사이즈가 6보다 크면 메모리 초과 발생; | |
MAX_SEQ_LEN = 512 | |
import os # GPU 설정 | |
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"; | |
os.environ["CUDA_VISIBLE_DEVICES"]="0"; | |
import warnings # warning message ignore | |
warnings.filterwarnings(action='ignore') | |
# install transformers | |
# !pip install transformers | |
import transformers | |
# model import | |
from transformers import DistilBertConfig, TFDistilBertForSequenceClassification, DistilBertTokenizer | |
from sklearn.model_selection import train_test_split | |
# 한글 폰트 설정 | |
if platform.system() == 'Darwin': # mac | |
plt.rc('font', family='AppleGothic') | |
else: # window or linux | |
plt.rc('font', family='NanumGothicCoding') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment