반응형 attention1 [Keras] Attention 을 이용해 자연어 감성 분석 해보기 : Hierarchical Attention Networks for Document Classification 구현 데이터 셋 : Imdb import tensorflow as tf gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: # 첫 번째 GPU만 사용하도록 제한 tf.config.experimental.set_visible_devices(gpus[0], 'GPU') except RuntimeError as e: print(e) MAX_SENTENCES = 10 MAX_SENTENCE_LENGTH = 25 import os, re import pandas as pd import tensorflow as tf from tensorflow.keras import utils dataset = tf.keras.utils.get_file( f.. 2020. 11. 10. 이전 1 다음 반응형