LSTM Input Shape 정리 (input_shape, batch_input_shape, Incompatible shapes 에러)

LSTM Input Shape 정리 (input_shape, batch_input_shape, Incompatible shapes 에러)

LSTM input_shape의 (time_step, features) 의미와 batch_input_shape, 그리고 “Incompatible shapes” 에러가 왜 나는지 정리. 2026년에 Keras 3로 다시 돌려본 결과 포함.

Corrected September 2026: An earlier version said the data size must always be divisible by the batch size. That is only true for a stateful LSTM (stateful=True); a normal LSTM trains fine with a smaller last batch. The post now includes a re-run on TensorFlow 2.21 / Keras 3.15, where batch_input_shape has been replaced by keras.Input(batch_shape=...).

Conda 사용법

Conda 사용법

잊기전에 적어두자 Conda 사용법!

2026-11-16 갱신: macOS 27.0.1 arm64의 Miniconda(conda 25.11.1)에서 임시 환경 생성·활성화·조회·삭제를 확인했다. 원문의 환경 목록 명령을 고치고 실행 결과를 붙였다.

torch.cuda.is_available() False 해결 (no kernel image 에러 포함)

torch.cuda.is_available() False 해결 (no kernel image 에러 포함)

torch.cuda.is_available()가 False이거나 “no kernel image is available” 에러가 날 때 확인할 것. 대부분 CPU 전용 torch가 깔렸거나 GPU에 맞지 않는 빌드다. 세 줄로 확인하는 코드 포함.

Corrected October 2026: The original list of causes was misleading. PyTorch’s pip and conda builds ship their own CUDA runtime, so the system CUDA Toolkit (nvcc) version does not need to match. “No kernel image” means the installed PyTorch build was not compiled for your GPU’s architecture. PyTorch also stopped publishing to the -c pytorch conda channel after 2.5. A diagnostic script, tested with PyTorch 2.14.1, was added at the end.

RNN에 관한 정리?

RNN에 관한 정리?

RNN이 뭔지, 왜 활성화 함수로 relu 대신 tanh를 쓰는지 정리한 노트. relu와 tanh를 50번 반복해 본 작은 실험 포함.

Corrected September 2026: An earlier version called ReLU a linear function. ReLU is non-linear; the real problem is that it has no upper bound, so repeated steps can blow up. A small NumPy experiment now shows this, and an unfinished list item was removed.

TensorFlow란?

TensorFlow란?

TensorFlow가 뭔지, 추천 시스템 쪽에서는 뭘 쓸 수 있는지 짧게 적어둔 메모. PyTorch와의 차이도 한 줄씩.

Corrected September 2026: Removed a long pasted section that was left in by mistake and fixed a few facts: TensorFlow 2 runs eagerly by default (graphs are optional via tf.function), Keras was already part of TensorFlow before 2.0, and TFX is a production pipeline tool rather than a recommender library.

Pagination