摘要: 点击查看代码 import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from torchvision import datasets, transf 阅读全文
posted @ 2025-10-16 17:11 四季歌镜 阅读(9) 评论(0) 推荐(0)
摘要: 我在这个卷积神经网络(CNN)入门教程里,学到了不少干货。首先是卷积层的四个核心参数,滑动窗口步长、卷积核尺寸、边缘填充、卷积核个数,视频用很直观的方式把这些概念讲透了。尤其是边缘填充部分,通过实际计算演示,我弄明白了边缘填充的作用和具体操作。另外,我还系统了解了CNN的整体结构,从卷积层到池化层、 阅读全文
posted @ 2025-10-16 14:53 四季歌镜 阅读(4) 评论(0) 推荐(0)
摘要: 一、学习内容总结 基础语法 掌握变量、数据类型(整型、字符串、列表、字典等)及类型转换 熟练使用运算符(算术、比较、逻辑)和表达式 理解代码缩进与注释规范,培养良好编程风格 流程控制 条件语句(if-elif-else)实现分支逻辑 循环语句(for/while)处理重复任务,配合break/con 阅读全文
posted @ 2025-06-23 15:19 四季歌镜 阅读(7) 评论(0) 推荐(0)
摘要: 开始界面: 运行界面; 结束界面: 代码: 点击查看代码 import pygame import sys import random # Initialize pygame pygame.init() # Game constants SCREEN_WIDTH = 800 SCREEN_HEIGH 阅读全文
posted @ 2025-06-22 12:13 四季歌镜 阅读(27) 评论(0) 推荐(0)
摘要: 8.1 from random import random def printInatro(): print("这个程序模拟两个选手A何B的某种竞技比赛") print("程序运行需要A和B的能力值(用0到1之间的小数表示)") def getInputs(): a = eval(input("请输 阅读全文
posted @ 2025-05-25 19:02 四季歌镜 阅读(36) 评论(0) 推荐(0)
摘要: 7.1 import tokenize import keyword from io import BytesIO def convert_python_file(source_path, target_path): with open(source_path, 'rb') as file: tok 阅读全文
posted @ 2025-05-18 17:58 四季歌镜 阅读(34) 评论(0) 推荐(0)
摘要: 5.1 def drawaq(n): line = 3n+1 for i in range(1,line+1): if i%3 == 1: print(n"+ ",end="") print("+") else: print("| "*n,end="") print("|") n = eval(in 阅读全文
posted @ 2025-04-20 18:57 四季歌镜 阅读(7) 评论(0) 推荐(0)
摘要: 习题4.1 GuessANum.py target = 425 guess = 0 cishu = 0 while guess != target: guess = eval(input('请输入一个猜测的整数(1至1000):')) if guess > target: print('猜大了') 阅读全文
posted @ 2025-04-06 18:46 四季歌镜 阅读(19) 评论(0) 推荐(0)
摘要: 3.19 import time t = time.gmtime() print(time.strftime("%Y-%m-%d",t)) 3.20 import time t = time.gmtime() print(time.strftime("%Y-%m-%d",t)) print(time 阅读全文
posted @ 2025-03-30 11:50 四季歌镜 阅读(13) 评论(0) 推荐(0)
摘要: 习题3.1 Zhongliang = eval(input("请输入体重(KG):")) for i in range(1,11): Zhongliang = Zhongliang + 0.5 Zhongliangyq = Zhongliang * 0.16 print("第{}年的在地球体重为:{ 阅读全文
posted @ 2025-03-23 12:04 四季歌镜 阅读(7) 评论(0) 推荐(0)