摘要: import tensorflow as tf from tensorflow.keras.datasets import cifar10 from tensorflow.keras.utils import to_categorical from tensorflow.keras.models i 阅读全文
posted @ 2025-10-15 23:30 千树(好困版) 阅读(6) 评论(0) 推荐(0)
摘要: 视频从卷积操作的基本概念入手,逐步深入到步长、边缘填充、特征图尺寸计算、参数共享、池化层作用以及整体网络架构等关键知识点,通过可视化的矩阵运算示例,让抽象的算法原理变得通俗易懂。 (一)卷积操作:特征提取的基石 卷积操作是CNN区别于传统神经网络的核心环节。视频中通过输入图像(Input Volum 阅读全文
posted @ 2025-10-15 23:25 千树(好困版) 阅读(21) 评论(0) 推荐(0)
摘要: import jieba from collections import Counter 构建同义映射字典,可根据实际需要补充更多《西游记》人物的不同说法 synonym_map = { "孙猴子": "孙悟空", "齐天大圣": "孙悟空", "弼马温": "孙悟空", "美猴王": "孙悟空" 阅读全文
posted @ 2025-06-22 21:52 千树(好困版) 阅读(26) 评论(0) 推荐(0)
摘要: 一、库的基本函数用法​ (一)numpy​ numpy 是 Python 科学计算的基础库,提供了高性能的多维数组对象以及用于处理数组的函数。​ 1.创建数组:使用numpy.array()函数可以将列表转换为数组,例如import numpy as np; a = np.array([1, 2, 阅读全文
posted @ 2025-06-22 21:46 千树(好困版) 阅读(11) 评论(0) 推荐(0)
摘要: import pygame import random import time 初始化 Pygame pygame.init() 游戏窗口设置 WIDTH, HEIGHT = 600, 400 screen = pygame.display.set_mode((WIDTH, HEIGHT)) pyg 阅读全文
posted @ 2025-06-22 15:59 千树(好困版) 阅读(21) 评论(0) 推荐(0)
摘要: 8.1:import random def ping_pong_match(): player1_score = 0 player2_score = 0 while True: # 随机决定得分方 winner = random.choice([1, 2]) if winner == 1: play 阅读全文
posted @ 2025-05-25 18:45 千树(好困版) 阅读(38) 评论(0) 推荐(0)
摘要: ![](https://img2024.cnblogs.com/blog/3608548/202505/3608548-20250518032352504-378275091.png) ![](https://img2024.cnblogs.com/blog/3608548/202505/3608548-20250518032400365-35627464.png) ![](https://img 阅读全文
posted @ 2025-05-18 03:24 千树(好困版) 阅读(9) 评论(0) 推荐(0)
摘要: ![](https://img2024.cnblogs.com/blog/3608548/202504/3608548-20250420162419154-914571736.png) ![](https://img2024.cnblogs.com/blog/3608548/202504/3608548-20250420162428494-599394092.png) ![](https://im 阅读全文
posted @ 2025-04-20 16:25 千树(好困版) 阅读(27) 评论(0) 推荐(0)
摘要: ![](https://img2024.cnblogs.com/blog/3608548/202504/3608548-20250402121155679-925420359.png) ![](https://img2024.cnblogs.com/blog/3608548/202504/3608548-20250402121203762-314257615.png) ![](https://im 阅读全文
posted @ 2025-04-02 12:12 千树(好困版) 阅读(10) 评论(0) 推荐(0)
摘要: from tqdm import tqdm def calculate_pi(iterations): pi = 0 sign = 1 denominator = 1 for i in tqdm(range(iterations), desc="Calculating Pi"): pi += sig 阅读全文
posted @ 2025-04-02 11:42 千树(好困版) 阅读(38) 评论(0) 推荐(0)