Library Search
结果页01-tensor-basics
在 知识库 中找到 8 个匹配结果。
知识库
知识库
8 个 01-tensor-basics # PyTorch Tensor 基础 —— 从 NumPy 到 GPU
## 目标
- 理解 Tensor 的创建、操作、形状变换
- 掌握 CPU ↔ GPU 迁移
- 理解 Tensor 与 NumPy ndarray 的互操作
- 掌握 autograd 自动微分基础
## 完整代码
```python
import torch
import numpy as np
# ====… 3% ST-LINK V2 使用与配置代码例程 ```xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- STM32CubeIDE Debug Configuration (.launch) -->
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<string… 2% Prometheus 数据源 + 主机监控 Dashboard ```json
{
"dashboard": {
"title": "主机监控总览",
"tags": ["prometheus", "node"],
"timezone": "browser",
"panels": [
{
"title": "CPU 使用率",
"type": "timeseries",… 2% Hello World — 第一个测试用例 ```
test_math_utils.py::test_divide_normal PASSED
test_math_utils.py::test_divide_by_zero PASSED
test_math_utils.py::test_is_prime[1-False] PASSED
test_math_utils.py::test_is_prime[2-True] PASSED
test… 2% 原生类别特征 + early stopping 分类实战 ```
正样本比例: 35.62%
Training until validation scores don't improve for 20 rounds
[50] valid_0's auc: 0.8234
[100] valid_0's auc: 0.8456
Early stopping, best iteration is [87]
测试准确率: 0.7823
最佳迭代轮次: 87
最… 2% 主循环 ```
Project/
├── Core/
│ ├── Inc/
│ │ └── module_4g.h
│ └── Src/
│ ├── main.c
│ ├── module_4g.c
│ └── stm32f1xx_it.c ← HAL_UART_RxCpltCallback 在此
├── Drivers/
│ └── ST… 2% 01-Keras与部署实战 # TensorFlow 教程 —— Keras 进阶与模型部署
## 本章目标
- 掌握 Keras Functional API 和子类化 API
- 了解 TF 与 PyTorch 的核心差异
- 掌握 TF Lite 与 TF Serving 部署
## 1. 三种建模 API 对比
### Sequential(最简单)
```python
model = tf.keras.Se… 2% 01-keras-sequential-mnist # TensorFlow Keras —— MNIST 手写数字分类
## 目标
- 掌握 `tf.keras.Sequential` 模型构建
- 理解 `compile` → `fit` → `evaluate` → `predict` 标准流程
- 使用 TensorBoard 可视化训练过程
## 完整代码
```python
import tensorflow as tf
imp… 1%