1 2 3 4 5 ··· 7 下一页
摘要: Ubuntu 22.04 Server 机器学习环境安装——保姆级教程 1. 安装操作系统 https://ubuntu.com/download/server 下载,写盘重启,最好备整张固态 一路默认,连接主wifi,由于我是双系统不要覆盖已有系统盘 直到 [] Set up this disk 阅读全文
posted @ 2023-04-19 02:30 xytpai 阅读(517) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-03-11 12:45 xytpai 阅读(1) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-01-13 23:43 xytpai 阅读(0) 评论(0) 推荐(0)
摘要: Pub-IP Server # git clone https://github.com.cnpmjs.org/fatedier/frp wget https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_a 阅读全文
posted @ 2021-08-02 00:37 xytpai 阅读(167) 评论(0) 推荐(0)
摘要: import os import torch import torch.nn as nn import torch._inductor.pattern_matcher as pm from torch._higher_order_ops.auto_functionalize import auto_ 阅读全文
posted @ 2025-09-22 01:02 xytpai 阅读(12) 评论(0) 推荐(0)
摘要: 下载模型: hf download Qwen/Qwen3-4B-Instruct-2507 --local-dir ./ 下载完成后可以用简单的脚本推理: from transformers import AutoModelForCausalLM, AutoTokenizer # model_nam 阅读全文
posted @ 2025-08-30 15:50 xytpai 阅读(11) 评论(0) 推荐(0)
摘要: import sys filename = sys.argv[1] with open(filename, 'r') as f: lines = f.readlines() def extract_info(line): line = line.split() name = line[0].stri 阅读全文
posted @ 2023-12-15 10:05 xytpai 阅读(15) 评论(0) 推荐(0)
摘要: Code Object # 每一个函数只会生成一个code object import dis def func(a, b): return a * b code = func.__code__ print(dis.dis(func)) # for dis doc: https://docs.pyt 阅读全文
posted @ 2023-11-18 00:59 xytpai 阅读(13) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-10-18 13:13 xytpai 阅读(7) 评论(0) 推荐(0)
摘要: ## 1. 路径选择 #### 1.1. House Robber ```txt 给一个自然数数组,在不允许相邻取的情况下,求可取的最大和 Input: [1,2,3,1] Output: 4 取1,3和为4 方法:设定状态dp[n]表示前n项在不能相邻取情况下最大和取法的最大和(结果),要用前面信 阅读全文
posted @ 2023-08-03 19:39 xytpai 阅读(52) 评论(0) 推荐(0)
摘要: #### 1. 斐波那契数列的第n项 ```python def Fibonacci(self, n): if n==0: return 0 if n==1: return 1 a, b, c = 0, 1, -1 for i in range(2, n + 1): c = a + b a = b 阅读全文
posted @ 2023-08-03 19:17 xytpai 阅读(35) 评论(0) 推荐(0)
摘要: ### 1. 桌球问题 ```txt 矩形球桌四个角有洞 yx 坐标在 (0, 0) (m, 0) (m, n) (0, n) 球从 (0,0) 沿 45 度方向无限大力发射,求mn满足啥条件能落袋 解法: 这种桌球问题只要无限延伸方块就行,相当于解 y=x 有没有 (am, bn) 解,其中 a 阅读全文
posted @ 2023-07-29 22:06 xytpai 阅读(18) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-05-28 22:10 xytpai 阅读(2) 评论(0) 推荐(0)
摘要: import torch import torch.nn.functional as F import math def fmha(q, k, v, is_causal=True): return F.scaled_dot_product_attention(q, k, v, attn_mask=N 阅读全文
posted @ 2023-05-18 13:43 xytpai 阅读(36) 评论(0) 推荐(0)
1 2 3 4 5 ··· 7 下一页