일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- opencv
- error
- TF
- TFRecord
- 비트코인
- Python
- 블록체인
- DataSet
- cv2
- qtdesigner
- 퍼셉트론
- keras
- TensorFlow
- 세계대전
- deeplearning
- 브렉시트
- dtype
- pyqt
- loss
- 세계사
- itksnap
- 유가 급등
- img
- numpy
- Training
- 유로화
- Perceptron
- Inference
- terminal
- 딥러닝
- Today
- Total
목록딥러닝 (22)
활연개랑
Transformer 기반 모델에서는 하나의 시퀀스를 하나의 벡터로 요약해야 하는 경우가 많음.예를 들어:문장 분류: 한 문장을 하나의 벡터로 표현이미지 분류: 한 장의 이미지를 하나의 벡터로 표현이럴 때 가장 자주 사용되는 방식이 바로 CLS(Classification) 토큰 활용임.CLS 토큰이란?BERT나 ViT 입력 시퀀스의 **맨 앞(0번째)**에 삽입되는 특수 토큰사전 정의된 의미가 없는 "빈칸" 같은 토큰모델이 학습을 통해 이 토큰에 의미를 부여하게 됨왜 CLS 토큰이 시퀀스를 대표하게 될까?1. 항상 같은 위치에 존재입력 시 맨 앞에 삽입됨위치 임베딩이 항상 고정됨모델이 예측 대상을 일관되게 학습할 수 있음2. 의미 없는 토큰 (초기 상태)실제 단어나 이미지 정보가 없음→ 자기 스스로 의미..
Train loss 'nan'이 나올 때 확인해 볼 것 * input image에 nan값이 들어가는지 체크* augmentation 이후 nan이 되는 데이터가 있는지 체크* normalize할 때, min과 max값이 둘 다 0이어서 분모가 0이 되는 경우가 있는지 체크 -> 분모에 작은 값(epsilon) 더하기* learning rate가 너무 커서 발산할 가능성이 있는지 체크* Gradient Explosion 또는 Underflow/Overflow 체크 --> Gradient Clipping을 적용하여 폭발적인 gradient를 방지
Traceback (most recent call last): File "/inference.py", line 244, in pred = model(input_img, is_training=False) File "/home/.local/lib/python3.8/site-packages/keras/engine/base_layer.py", line 1037, in __call__ outputs = call_fn(inputs, *args, **kwargs) File "/home/.local/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 885, in __call__ result = self._call(*args, **kwd..
((kernel size - 1) * dilated rate + 1)²
import tensorflow as tf from tensorflow.python.training import py_checkpoint_reader checkpoint_path = f'/cp-{123:0>4}.ckpt' reader = py_checkpoint_reader.NewCheckpointReader(checkpoint_path) dtype_map = reader.get_variable_to_dtype_map() shape_map = reader.get_variable_to_shape_map() state_dict = { v: reader.get_tensor(v) for v in shape_map} with open('weight_check.txt', 'w') as file: file.write..
image = tf.io.decode_raw(features['image'], tf.int16) image = tf.io.decode_raw(features['image'], tf.float32) tfrecord에 넣어주었던 type이랑 똑같이 넣어주어야 하는데 tfrecord에 float32으로 넣고 training에서 int16사용해서 오류남