- 博客(3)
- 收藏
- 关注
原创 解决python:RuntimeError: non-positive stride is not supported
此时padding为0不符合参数要求,torch会把padding=0当成是stride的参数,而stride不能为0,因此报错!
2023-02-27 13:51:49 1334
原创 RuntimeError: one of the variables needed for gradient computation has been modified by an inplace
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
2023-01-10 17:49:48 352
原创 根据阈值修改图像中的数值
根据阈值修改预测图像中的数值形成分类根据阈值将预测结果进行优化根据阈值将预测结果进行优化通常经过模型网络计算得到的pred_mask每一项有不同的阈值。在二值图中,通常只需要将有用的mask标注为255,其余均为0,也就是黑白标注。# 将a中大于阈值的置为255,小于阈值的置为0import numpy as npa = np.random.rand(500,500)#阈值为0.45a = np.where(a>=0.45,255,a)a = np.where(a<0.45
2021-12-16 16:54:40 2245
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人