Python

DeepAi Code Base

2023-07-29
高级代码题库 1. IOU def iou(box, boxes, isMin = False): box_area = (box[2] - box[0]) * (box[3] - box[1]) area = (boxes...
Read more

使用 Tqdm 实时显示 Loss 和 Acc 等信息

2022-05-30
Tqdm 是一个可以将 Python 脚本运行进度可视化的软件包,只需要封装进任何一个迭代器 tqdm(iterator) 或直接使用 trange() 代替 range(),即可在终端实时输出循环运行进度及预估剩余时间。 安装 使用 pi...
Read more
使用 Tqdm 实时显示 Loss 和 Acc 等信息

爱因斯坦求和约定 torch.einsum()

2022-05-23
使用 PyTorch 进行矩阵运算时,总是需要去记忆形如 torch.dot, torch.mm 的函数,当张量维度上升到四维及以上时,torch.einsum 是一种能够表达矩阵点积、外积、转置等运算,包括部分复杂张量运算在内的优雅方式。...
Read more
爱因斯坦求和约定 torch.einsum()

Python 中模块的搜索路径和包导入

2022-05-09
Module Searching Path The module searching path of Python is consists of 5 parts: The home directory of the script Pyth...
Read more