摘要: pytorch 的 reshape((-1, 1)) 是什么意思 代码 import torch print(torch.tensor([1,2,3,4,5,6,7,8]).reshape(-1,1)) tensor([[1], [2], [3], [4], [5], [6], [7], [8]]) 阅读全文
posted @ 2025-12-30 10:31 fanbal 阅读(5) 评论(0) 推荐(0)
摘要: pytorch 中 argmax(1) 是什么意思? 示例 import torch print(torch.tensor([[1,2,3,4,5],[100,3,4,5,6]]).argmax(1)) tensor([4, 0]) 解释 阅读全文
posted @ 2025-12-30 09:43 fanbal 阅读(4) 评论(0) 推荐(0)
摘要: pytorch 识别 MNIST 数据集实现数字识别 零、导入数据集 结构如下: import torch import torchvision from torch.utils.data import DataLoader # 都是在0~1的喵 train_data = torchvision.d 阅读全文
posted @ 2025-12-30 09:27 fanbal 阅读(6) 评论(0) 推荐(0)
摘要: Godot 使用 Tileset Collision Generator (free version) 助力 TileSet 图块物理碰撞层的编辑 感谢 @Cremis018 提供的非常大的帮助 插件地址:https://godotengine.org/asset-library/asset/312 阅读全文
posted @ 2025-11-29 23:36 fanbal 阅读(52) 评论(0) 推荐(0)
摘要: 关于 .NET AssemblyLoadContext 的研究笔记 public class MyAssemblyLoadContext : AssemblyLoadContext { private readonly AssemblyDependencyResolver _resolver; pu 阅读全文
posted @ 2025-11-28 11:12 fanbal 阅读(14) 评论(0) 推荐(0)
摘要: ASP.NET Core Web API 为 Swagger 创建多个分组文档的教程,我们主要可以通过 `AddSwaggerGen`、`SwaggerDoc`、`UseSwaggerUI`、`SwaggerEndpoint`、`ApiExplorerSettingsAttribute` 这几个 API 进行相关的编辑,实现在右上角 Select a definition 处将内容展开为更多信息。 阅读全文
posted @ 2025-11-24 10:01 fanbal 阅读(15) 评论(0) 推荐(0)
摘要: pandas dataframe astypes 能够转换的类型简单笔记 阅读全文
posted @ 2025-11-20 10:02 fanbal 阅读(8) 评论(0) 推荐(0)
摘要: vue3 使用 worker 实现定时后台更新 worker 的创建 setInterval(() => { self.postMessage({ eventName: "hello", time: Date.now() }) // post 出来的数据对象是自定义的。 }, 1000); work 阅读全文
posted @ 2025-11-19 11:00 fanbal 阅读(11) 评论(0) 推荐(0)
摘要: matplotlib plot 折线图使用体验 plot 只是默认情况下指代折线图,本身 plot 其实是 所有图标都可以表示。 效果图 代码 import matplotlib.pyplot as plt import numpy as np # 存在感没有很高 # x 和 y 需要一一对应 xp 阅读全文
posted @ 2025-11-18 11:34 fanbal 阅读(5) 评论(0) 推荐(0)
摘要: vue3 创建简单路由的简单笔记 导入和配置路由 import { createRouter, createWebHistory, type Router, type RouterOptions } from 'vue-router' import MainPage from '../../page 阅读全文
posted @ 2025-11-18 11:13 fanbal 阅读(5) 评论(0) 推荐(0)