← 홈

🧪

⌘K
🤖
Claude Code AI 도구
🤗
Hugging Face AI 도구
🦜
LangChain AI 도구
🧠
Keras AI 도구
🦙
Ollama AI 도구
🐍
Python 프로그래밍 언어
🟨
JavaScript 프로그래밍 언어
🔷
TypeScript 프로그래밍 언어
⚛️
React 프로그래밍 언어
🐹
Go 프로그래밍 언어
🦀
Rust 프로그래밍 언어
📊
MATLAB 프로그래밍 언어
🗄️
SQL 프로그래밍 언어
⚙️
C/C++ 프로그래밍 언어
Java 프로그래밍 언어
🟣
C# 프로그래밍 언어
🍎
Swift 프로그래밍 언어
🟠
Kotlin 프로그래밍 언어
Next.js 프로그래밍 언어
💚
Vue.js 프로그래밍 언어
🔥
Svelte 프로그래밍 언어
🎨
Tailwind CSS 프로그래밍 언어
💚
Node.js 프로그래밍 언어
🌐
HTML 프로그래밍 언어
🎨
CSS/SCSS 프로그래밍 언어
🐘
PHP 프로그래밍 언어
💎
Ruby 프로그래밍 언어
🔴
Scala 프로그래밍 언어
📊
R 프로그래밍 언어
🎯
Dart 프로그래밍 언어
💧
Elixir 프로그래밍 언어
🌙
Lua 프로그래밍 언어
🐪
Perl 프로그래밍 언어
🅰️
Angular 프로그래밍 언어
🚂
Express.js 프로그래밍 언어
🐱
NestJS 프로그래밍 언어
🛤️
Ruby on Rails 프로그래밍 언어
◼️
GraphQL 프로그래밍 언어
🟪
Haskell 프로그래밍 언어
💚
Nuxt.js 프로그래밍 언어
🔷
SolidJS 프로그래밍 언어
htmx 프로그래밍 언어
💻
VS Code 개발 도구
🧠
PyCharm 개발 도구
📓
Jupyter 개발 도구
🧠
IntelliJ IDEA 개발 도구
💚
Neovim 개발 도구
🔮
Emacs 개발 도구
🔀
Git DevOps & CLI
🐳
Docker DevOps & CLI
☸️
Kubernetes DevOps & CLI
☁️
AWS CLI DevOps & CLI
🔄
GitHub Actions DevOps & CLI
🐧
Linux 명령어 DevOps & CLI
💻
Bash 스크립팅 DevOps & CLI
🌐
Nginx DevOps & CLI
📝
Vim DevOps & CLI
🔨
Makefile DevOps & CLI
🧪
Pytest DevOps & CLI
🪟
Windows DevOps & CLI
📦
패키지 매니저 DevOps & CLI
🍎
macOS DevOps & CLI
🏗️
Terraform DevOps & CLI
🔧
Ansible DevOps & CLI
Helm DevOps & CLI
🔨
Jenkins DevOps & CLI
🔥
Prometheus DevOps & CLI
📊
Grafana DevOps & CLI
💻
Zsh DevOps & CLI
🐟
Fish Shell DevOps & CLI
💙
PowerShell DevOps & CLI
🔄
Argo CD DevOps & CLI
🔀
Traefik DevOps & CLI
☁️
Azure CLI DevOps & CLI
☁️
Google Cloud CLI DevOps & CLI
📟
tmux DevOps & CLI
🔧
jq DevOps & CLI
✂️
sed DevOps & CLI
📊
awk DevOps & CLI
🌊
Apache Airflow DevOps & CLI
🔢
NumPy 데이터베이스 & 데이터
🐼
Pandas 데이터베이스 & 데이터
🔥
PyTorch 데이터베이스 & 데이터
🧠
TensorFlow 데이터베이스 & 데이터
📈
Matplotlib 데이터베이스 & 데이터
🐘
PostgreSQL 데이터베이스 & 데이터
🐬
MySQL 데이터베이스 & 데이터
🍃
MongoDB 데이터베이스 & 데이터
🔴
Redis 데이터베이스 & 데이터
🔍
Elasticsearch 데이터베이스 & 데이터
🤖
Scikit-learn 데이터베이스 & 데이터
👁️
OpenCV 데이터베이스 & 데이터
Apache Spark 데이터베이스 & 데이터
🪶
SQLite 데이터베이스 & 데이터
Supabase 데이터베이스 & 데이터
🔵
Neo4j 데이터베이스 & 데이터
📨
Apache Kafka 데이터베이스 & 데이터
🐰
RabbitMQ 데이터베이스 & 데이터
🔤
Regex 유틸리티
📝
Markdown 유틸리티
📄
LaTeX 유틸리티
🔐
SSH & GPG 유틸리티
🌐
curl & HTTP 유틸리티
📜
reStructuredText 유틸리티
🚀
Postman 유틸리티
🎬
FFmpeg 유틸리티
🖼️
ImageMagick 유틸리티
🔍
ripgrep 유틸리티
🔍
fzf 유틸리티
📗
Microsoft Excel 오피스 애플리케이션
📘
Microsoft Word 오피스 애플리케이션
📙
Microsoft PowerPoint 오피스 애플리케이션
📝
한컴 한글 한컴오피스
📽️
한컴 한쇼 한컴오피스
📊
한컴 한셀 한컴오피스
📄
Google 문서 Google Workspace
📊
Google 스프레드시트 Google Workspace
📽️
Google 프레젠테이션 Google Workspace
🔌
Cadence Virtuoso EDA & 하드웨어
⚙️
Synopsys EDA EDA & 하드웨어
💎
Verilog & VHDL EDA & 하드웨어
LTSpice EDA & 하드웨어
🔧
KiCad EDA & 하드웨어
📝
Notion 생산성 도구
💎
Obsidian 생산성 도구
💬
Slack 생산성 도구
🎮
Discord 생산성 도구
🎨
Figma 디자인 도구
📘
Confluence Atlassian
📋
Jira Atlassian
🃏
Jest 테스팅
Vitest 테스팅
🎭
Playwright 테스팅
🌲
Cypress 테스팅
🌐
Selenium 테스팅
💙
Flutter 모바일 개발
📱
React Native 모바일 개발
🍎
SwiftUI 모바일 개발
📱
Expo 모바일 개발
🐍
Django 웹 프레임워크
FastAPI 웹 프레임워크
🌶️
Flask 웹 프레임워크
🍃
Spring Boot 웹 프레임워크
🍸
Gin 웹 프레임워크
Vite 빌드 도구
📦
Webpack 빌드 도구
esbuild 빌드 도구
🐘
Gradle 빌드 도구
🪶
Maven 빌드 도구
🔧
CMake 빌드 도구
🎮
Unity 게임 개발
🤖
Godot 게임 개발
🔌
Arduino 임베디드 & IoT
🔍
Nmap 보안
🐕
Datadog 모니터링
📖
Swagger/OpenAPI 문서화
검색 결과가 없습니다
EN KO

기초

설치

pip install tensorflow TensorFlow 설치 (Keras 포함)
pip install keras 독립 Keras 설치

모델 구축

Sequential 모델
from tensorflow import keras
from tensorflow.keras import layers

model = keras.Sequential([
    layers.Dense(64, activation='relu', input_shape=(784,)),
    layers.Dropout(0.2),
    layers.Dense(64, activation='relu'),
    layers.Dense(10, activation='softmax')
])

# Or add layers
model = keras.Sequential()
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10))
Functional API
inputs = keras.Input(shape=(784,))
x = layers.Dense(64, activation='relu')(inputs)
x = layers.Dense(64, activation='relu')(x)
outputs = layers.Dense(10, activation='softmax')(x)

model = keras.Model(inputs=inputs, outputs=outputs)

# Multiple inputs/outputs
input_a = keras.Input(shape=(32,), name='input_a')
input_b = keras.Input(shape=(32,), name='input_b')
x = layers.concatenate([input_a, input_b])
output = layers.Dense(1)(x)
model = keras.Model(inputs=[input_a, input_b], outputs=output)

레이어

일반 레이어

Dense 레이어
# Fully connected layer
layers.Dense(units=64, activation='relu')
layers.Dense(units=10, activation='softmax')

# With regularization
layers.Dense(64,
    kernel_regularizer=keras.regularizers.l2(0.01),
    bias_regularizer=keras.regularizers.l1(0.01),
    activity_regularizer=keras.regularizers.l1_l2(l1=0.01, l2=0.01)
)
합성곱 레이어
# 2D Convolution
layers.Conv2D(filters=32, kernel_size=(3, 3), activation='relu', padding='same')

# 1D Convolution (for sequences)
layers.Conv1D(filters=32, kernel_size=3, activation='relu')

# Transposed (deconvolution)
layers.Conv2DTranspose(32, (3, 3), strides=(2, 2), padding='same')

# Separable convolution
layers.SeparableConv2D(32, (3, 3))
풀링 레이어
layers.MaxPooling2D(pool_size=(2, 2))
layers.AveragePooling2D(pool_size=(2, 2))
layers.GlobalMaxPooling2D()
layers.GlobalAveragePooling2D()

# 1D pooling
layers.MaxPooling1D(pool_size=2)
layers.GlobalMaxPooling1D()
순환 레이어
# LSTM
layers.LSTM(64, return_sequences=True)  # For stacking
layers.LSTM(64, return_sequences=False) # For output

# GRU
layers.GRU(64, return_sequences=True)

# Bidirectional
layers.Bidirectional(layers.LSTM(64, return_sequences=True))

# SimpleRNN
layers.SimpleRNN(64)
정규화 레이어
# Dropout
layers.Dropout(0.5)
layers.SpatialDropout2D(0.5)  # For Conv2D

# Batch normalization
layers.BatchNormalization()

# Layer normalization
layers.LayerNormalization()

특수 레이어

임베딩
# Word embedding
layers.Embedding(
    input_dim=vocab_size,  # Vocabulary size
    output_dim=embedding_dim,  # Embedding dimension
    input_length=max_length  # Sequence length
)
어텐션
# Multi-head attention
layers.MultiHeadAttention(
    num_heads=8,
    key_dim=64,
    dropout=0.1
)

# Additive attention
layers.Attention()([query, value])
형태 변경 레이어
layers.Flatten()
layers.Reshape((4, 4, 3))
layers.Permute((2, 1))
layers.RepeatVector(3)

컴파일 및 학습

컴파일

모델 컴파일
model.compile(
    optimizer='adam',
    loss='sparse_categorical_crossentropy',
    metrics=['accuracy']
)

# With custom optimizer
model.compile(
    optimizer=keras.optimizers.Adam(learning_rate=0.001),
    loss=keras.losses.SparseCategoricalCrossentropy(),
    metrics=[keras.metrics.SparseCategoricalAccuracy()]
)
옵티마이저
keras.optimizers.SGD(learning_rate=0.01, momentum=0.9)
keras.optimizers.Adam(learning_rate=0.001)
keras.optimizers.RMSprop(learning_rate=0.001)
keras.optimizers.Adagrad(learning_rate=0.01)
keras.optimizers.AdamW(learning_rate=0.001, weight_decay=0.01)
손실 함수
# Classification
'binary_crossentropy'          # Binary classification
'categorical_crossentropy'     # Multi-class (one-hot)
'sparse_categorical_crossentropy'  # Multi-class (integer labels)

# Regression
'mse'                          # Mean squared error
'mae'                          # Mean absolute error
'huber'                        # Huber loss

# Custom
keras.losses.BinaryCrossentropy(from_logits=True)

학습

모델 학습
history = model.fit(
    x_train, y_train,
    epochs=10,
    batch_size=32,
    validation_split=0.2,
    # or validation_data=(x_val, y_val),
    callbacks=[...],
    verbose=1
)

# Access history
history.history['loss']
history.history['accuracy']
history.history['val_loss']
콜백
# Early stopping
keras.callbacks.EarlyStopping(
    monitor='val_loss',
    patience=5,
    restore_best_weights=True
)

# Model checkpoint
keras.callbacks.ModelCheckpoint(
    filepath='model_{epoch:02d}.keras',
    save_best_only=True,
    monitor='val_loss'
)

# Learning rate scheduler
keras.callbacks.ReduceLROnPlateau(
    monitor='val_loss',
    factor=0.1,
    patience=3
)

# TensorBoard
keras.callbacks.TensorBoard(log_dir='./logs')

평가 및 예측

평가

평가 및 예측
# Evaluate on test data
loss, accuracy = model.evaluate(x_test, y_test)

# Predict
predictions = model.predict(x_test)

# Predict single sample
prediction = model.predict(x_test[0:1])

# Predict classes
class_predictions = predictions.argmax(axis=1)
모델 요약
# Print model summary
model.summary()

# Get model config
config = model.get_config()

# Count parameters
total_params = model.count_params()

저장 및 로드

저장 및 로드

모델 저장
# Save entire model (Keras format)
model.save('model.keras')

# Save weights only
model.save_weights('weights.weights.h5')

# Save architecture only
json_config = model.to_json()
with open('model.json', 'w') as f:
    f.write(json_config)
모델 로드
# Load entire model
model = keras.models.load_model('model.keras')

# Load weights
model.load_weights('weights.weights.h5')

# Load from JSON
with open('model.json') as f:
    json_config = f.read()
model = keras.models.model_from_json(json_config)

전처리

데이터 전처리

이미지 전처리
# Normalization layer
normalization = layers.Normalization()
normalization.adapt(x_train)

# Rescaling
layers.Rescaling(1./255)

# Data augmentation
data_augmentation = keras.Sequential([
    layers.RandomFlip("horizontal"),
    layers.RandomRotation(0.1),
    layers.RandomZoom(0.1),
    layers.RandomContrast(0.1),
])
텍스트 전처리
# Text vectorization
vectorize_layer = layers.TextVectorization(
    max_tokens=10000,
    output_mode='int',
    output_sequence_length=100
)
vectorize_layer.adapt(text_dataset)

# Get vocabulary
vocab = vectorize_layer.get_vocabulary()
데이터셋 API
import tensorflow as tf

# Create dataset
dataset = tf.data.Dataset.from_tensor_slices((x_train, y_train))
dataset = dataset.shuffle(buffer_size=1000)
dataset = dataset.batch(32)
dataset = dataset.prefetch(tf.data.AUTOTUNE)

# Image dataset from directory
train_ds = keras.utils.image_dataset_from_directory(
    'data/train',
    image_size=(224, 224),
    batch_size=32
)

전이 학습

사전 학습 모델

사전 학습 로드
# Load pretrained model
base_model = keras.applications.ResNet50(
    weights='imagenet',
    include_top=False,
    input_shape=(224, 224, 3)
)

# Freeze base model
base_model.trainable = False

# Add custom head
inputs = keras.Input(shape=(224, 224, 3))
x = base_model(inputs, training=False)
x = layers.GlobalAveragePooling2D()(x)
x = layers.Dense(256, activation='relu')(x)
outputs = layers.Dense(10, activation='softmax')(x)

model = keras.Model(inputs, outputs)
파인튜닝
# Unfreeze for fine-tuning
base_model.trainable = True

# Freeze early layers, train later layers
for layer in base_model.layers[:100]:
    layer.trainable = False

# Compile with lower learning rate
model.compile(
    optimizer=keras.optimizers.Adam(1e-5),
    loss='categorical_crossentropy',
    metrics=['accuracy']
)
사용 가능한 모델
keras.applications.VGG16()
keras.applications.VGG19()
keras.applications.ResNet50()
keras.applications.ResNet101()
keras.applications.InceptionV3()
keras.applications.MobileNetV2()
keras.applications.EfficientNetV2B0()
keras.applications.DenseNet121()