분류 전체보기

kaggle 코드를 참고하였습니다. 1. Import Libraries # importing required libraries import torch.nn as nn import torch import torch.nn.functional as F import math,copy,re import warnings import pandas as pd import numpy as np import seaborn as sns import torchtext import matplotlib.pyplot as plt warnings.simplefilter("ignore") print(torch.__version__) 2. Basic components Create Word Embeddings 우선, input sequ..
· 디버깅
평화롭게 huggingface 모듈로 bert 모델을 fine tuning하기 위해 학습시키던 도중 훈련도 돠 됬겠다 기쁜 마음으로 pipeline에 적용하려고 했으나, 요런 에러가 등장했다. RuntimeError : Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select) 처음에는 아 model.to(device)를 깜빡했네! 라고 생각해서 바꿔줬는데 아무리 trainer 내부의 모델을 to(device) 처리해줘도 아무런 변화가없었다... 결론부터 말하자..
우당탕탕코린이
'분류 전체보기' 카테고리의 글 목록 (4 Page)