프로젝트 - [NLP -> Tensorflow 학습시키기(CPU)] => GPU 학습으로 변경(환경 셋팅)
2025. 9. 25. 07:51ㆍ카테고리 없음
i7-1350 / 16메모리 / GPU 사용하지 않음
C:\Users\lch30\PyCharmMiscProject\.venv\Scripts\python.exe C:\Users\lch30\PyCharmMiscProject\chatbot_train_api.py
2025-09-25 00:39:58.973505: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-09-25 00:40:00.755720: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
📂 총 12개의 .zip 파일을 발견했습니다. 데이터를 파싱합니다...
- 처리 중: TL_01. KAKAO(2).zip
- 처리 중: TL_01. KAKAO(3).zip
- 처리 중: TL_01. KAKAO(4).zip
- 처리 중: TL_02. FACEBOOK.zip
- 처리 중: TL_03. INSTAGRAM.zip
- 처리 중: TL_04. BAND.zip
- 처리 중: TL_05. NATEON.zip
- 처리 중: VL_01. KAKAO.zip
- 처리 중: VL_02. FACEBOOK.zip
- 처리 중: VL_03. INSTAGRAM.zip
- 처리 중: VL_04. BAND.zip
- 처리 중: VL_05. NATEON.zip
✅ 총 1004796개의 대화 쌍을 로드했습니다.
질문 샘플: 먹방은 건강에 치명적일 꺼 같아
답변 샘플: 맞아, 하지만 먹는 게 좋아 너무
------------------------------
🔁 질문 데이터 전처리를 시작합니다...
100%|██████████| 11/11 [20:16<00:00, 110.55s/it]
0%| | 0/11 [00:00<?, ?it/s]
🔁 답변 데이터 전처리를 시작합니다...
100%|██████████| 11/11 [38:57<00:00, 212.50s/it]
✅ 데이터 전처리 완료!
------------------------------
2025-09-25 01:39:48.377469: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Model: "functional"
┌─────────────────────┬───────────────────┬────────────┬───────────────────┐
│ Layer (type) │ Output Shape │ Param # │ Connected to │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ input_layer │ (None, None) │ 0 │ - │
│ (InputLayer) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ input_layer_1 │ (None, None) │ 0 │ - │
│ (InputLayer) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ embedding │ (None, None, 256) │ 15,860,992 │ input_layer[0][0] │
│ (Embedding) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ embedding_1 │ (None, None, 256) │ 15,860,992 │ input_layer_1[0]… │
│ (Embedding) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ lstm (LSTM) │ [(None, None, │ 197,120 │ embedding[0][0] │
│ │ 128), (None, │ │ │
│ │ 128), (None, │ │ │
│ │ 128)] │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ lstm_1 (LSTM) │ [(None, None, │ 197,120 │ embedding_1[0][0… │
│ │ 128), (None, │ │ lstm[0][1], │
│ │ 128), (None, │ │ lstm[0][2] │
│ │ 128)] │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ dense (Dense) │ (None, None, │ 7,992,453 │ lstm_1[0][0] │
│ │ 61957) │ │ │
└─────────────────────┴───────────────────┴────────────┴───────────────────┘
Total params: 40,108,677 (153.00 MB)
Trainable params: 40,108,677 (153.00 MB)
Non-trainable params: 0 (0.00 B)
🚀 대용량 데이터로 모델 학습을 시작합니다...
Epoch 1/30
12560/12560 ━━━━━━━━━━━━━━━━━━━━ 17360s 1s/step - accuracy: 0.6430 - loss: 2.4280 - val_accuracy: 0.5850 - val_loss: 2.6745
Epoch 2/30
3768/12560 ━━━━━━━━━━━━━━━━━━━━ 3:04:50 1s/step - accuracy: 0.6611 - loss: 2.1859
Process finished with exit code -1
13th Gen Intel(R) Core(TM) i7-13700 / 31.GB 램 으로 돌린 결과 CPU 점유율 100%
D:\DEV05\workspace_python_ict05\PythonProject\PythonProject\.venv\Scripts\python.exe D:\DEV05\workspace_python_ict05\PythonProject\PythonProject\chatbot_train_api.py
2025-09-25 09:25:52.508488: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-09-25 09:25:53.506114: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
📂 총 3개의 .zip 파일을 발견했습니다. 데이터를 파싱합니다...
- 처리 중: TL_01. KAKAO(2).zip
- 처리 중: TL_01. KAKAO(3).zip
- 처리 중: TL_01. KAKAO(4).zip
✅ 총 632405개의 대화 쌍을 로드했습니다.
질문 샘플: 먹방은 건강에 치명적일 꺼 같아
답변 샘플: 맞아, 하지만 먹는 게 좋아 너무
------------------------------
🔁 질문 데이터 전처리를 시작합니다...
100%|██████████| 7/7 [11:46<00:00, 100.86s/it]
0%| | 0/7 [00:00<?, ?it/s]
🔁 답변 데이터 전처리를 시작합니다...
100%|██████████| 7/7 [24:15<00:00, 208.00s/it]
✅ 데이터 전처리 완료!
------------------------------
2025-09-25 10:02:17.168803: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Model: "functional"
┌─────────────────────┬───────────────────┬────────────┬───────────────────┐
│ Layer (type) │ Output Shape │ Param # │ Connected to │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ input_layer │ (None, None) │ 0 │ - │
│ (InputLayer) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ input_layer_1 │ (None, None) │ 0 │ - │
│ (InputLayer) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ embedding │ (None, None, 256) │ 13,554,176 │ input_layer[0][0] │
│ (Embedding) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ embedding_1 │ (None, None, 256) │ 13,554,176 │ input_layer_1[0]… │
│ (Embedding) │ │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ lstm (LSTM) │ [(None, None, │ 197,120 │ embedding[0][0] │
│ │ 128), (None, │ │ │
│ │ 128), (None, │ │ │
│ │ 128)] │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ lstm_1 (LSTM) │ [(None, None, │ 197,120 │ embedding_1[0][0… │
│ │ 128), (None, │ │ lstm[0][1], │
│ │ 128), (None, │ │ lstm[0][2] │
│ │ 128)] │ │ │
├─────────────────────┼───────────────────┼────────────┼───────────────────┤
│ dense (Dense) │ (None, None, │ 6,830,034 │ lstm_1[0][0] │
│ │ 52946) │ │ │
└─────────────────────┴───────────────────┴────────────┴───────────────────┘
Total params: 34,332,626 (130.97 MB)
Trainable params: 34,332,626 (130.97 MB)
Non-trainable params: 0 (0.00 B)
🚀 대용량 데이터로 모델 학습을 시작합니다...
Epoch 1/30
447/7906 ━━━━━━━━━━━━━━━━━━━━ 2:14:23 1s/step - accuracy: 0.5532 - loss: 4.7834
Process finished with exit code 130