250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- correlation
- API
- XAI
- API Gateway
- integrated gradient
- flask
- 상관관계
- Airflow
- requests
- top_k
- tensorflow text
- UDF
- youtube data
- GenericGBQException
- TensorFlow
- BigQuery
- GCP
- grad-cam
- Retry
- gather_nd
- session 유지
- 유튜브 API
- login crawling
- hadoop
- Counterfactual Explanations
- airflow subdag
- chatGPT
- 공분산
- subdag
- spark udf
Archives
- Today
- Total
데이터과학 삼학년
[Transformers] 파이토치 가중치만 있는 모델을 TF로 사용?! 본문
반응형
- huggingface에서 모델을 임포트하여 TF로 사용하려 할때!!
ㄴ 파이토치 가중치만 존재하는 모델이 있다.
- 이때 tf에서 사용할 수 있는 방법은!!!! 존재한다. 바로...
ㄴ from_pt=True
from transfomers import TFAutoModel
model_ckt = 'distilbert-base-uncased'
tf_model = TFAutoModel.from_pretrained(model_ckt)
## 파이토치 가중치만 있는 모델
model_ckt_torch = 'xlm-roberta-base'
tf_xlmr = TFAutoModel.from_pretrained(model_ckt_torch, from_pt=True)
-> 자동으로 파이토치 가중치를 다운로드해 변환
728x90
반응형
LIST
'Natural Language Processing' 카테고리의 다른 글
language Model [uncased vs cased] (0) | 2023.09.09 |
---|---|
[크롤링] 로그인이 필요한 웹사이트 크롤링 방법(feat. requests) (0) | 2023.03.20 |
PMI(Pointwise Mutual Information); 점별 상호 정보량 (0) | 2022.11.27 |
[크롤링] selenium implicitly Wait VS Explicitly Wait (0) | 2022.05.31 |
[크롤링] What is the differences between requests and selenium? (0) | 2022.05.27 |
Comments