上一页 1 2 3 4 5 6 7 8 ··· 29 下一页
摘要: 配置文件launch.json修改justMycode:false { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "versio 阅读全文
posted @ 2024-09-06 11:21 无左无右 阅读(39) 评论(0) 推荐(0)
摘要: from typing import Tuple from PIL import Image, ImageDraw, ImageFont def box_intersection( b1: Tuple[int, int, int, int], b2: Tuple[int, int, int, int 阅读全文
posted @ 2024-08-09 15:22 无左无右 阅读(46) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/ljjjjjjjjjjj/article/details/123261360 例如有3个任务ABC,要分配给甲乙丙三人分别去完成,每个人完成3个任务所耗费精力不同(因为每个人特长不同),此处也叫完成任务耗费的代价,合理分配任务,可以达到总效率最高的目标。 阅读全文
posted @ 2024-03-08 16:08 无左无右 阅读(155) 评论(0) 推荐(0)
摘要: zip() 函数是 Python 内置函数之一,它可以将多个序列(列表、元组、字典、集合、字符串以及 range() 区间构成的列表)“压缩”成一个 zip 对象。所谓“压缩”,其实就是将这些序列中对应位置的元素重新组合,生成一个个新的元组。 import numpy as np my_list = 阅读全文
posted @ 2024-03-05 17:43 无左无右 阅读(86) 评论(0) 推荐(0)
摘要: chatgpt回答: 要得到一个形状为 [7, 6, 49, 3] 的 NumPy 矩阵,你需要组合这两个原始的矩阵(假设为矩阵 A 和矩阵 B)。不过,由于这两个矩阵的形状分别是 [7, 49, 2] 和 [6],它们无法直接通过常规的广播规则来获得一个 [7, 6, 49, 3] 形状的矩阵。但 阅读全文
posted @ 2024-02-29 15:01 无左无右 阅读(21) 评论(0) 推荐(0)
摘要: pytorch 一个tensor 比如是 [b0 b1 ] 用tensor.repeat(2)函数可以得到 [b0 b1 b0 b1 ] 我现在想得到 [b0 b0 b1 b1 ] 如何优雅的得到? import torch c = torch.randint(0, 9, (2, 3)) d = c 阅读全文
posted @ 2024-02-19 16:48 无左无右 阅读(20) 评论(0) 推荐(0)
摘要: 转载于:https://www.zhihu.com/question/562282138/answer/2947708508?utm_id=0 官方文档链接: https://pytorch.org/docs/stable/generated/torch.gather.html#torch.gath 阅读全文
posted @ 2024-02-04 21:20 无左无右 阅读(704) 评论(0) 推荐(0)
摘要: 可以看到使用列表推导式可以得到2倍速的提高 ex0 ##self.CLASSES ('car', 'truck', 'trailer', 'bus', 'construction_vehicle', 'bicycle', 'motorcycle', 'pedestrian', 'traffic_co 阅读全文
posted @ 2024-01-17 17:51 无左无右 阅读(18) 评论(0) 推荐(0)
摘要: ps -ef 可以看到程序名字 ps -ef | grep main | awk '{print $2}' |xargs kill -9 阅读全文
posted @ 2024-01-11 16:36 无左无右 阅读(41) 评论(0) 推荐(0)
摘要: "Cannot re-initialize CUDA in forked subprocess. " + msg) RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessi 阅读全文
posted @ 2024-01-09 15:28 无左无右 阅读(1521) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 29 下一页