![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
shatule
wanna better, give your best
展开
-
torch和torchvision版本对应关系
torch和torchvision版本对应关系torch torchvision python cuda1.5.1 0.6.1 >=3.6 9.2, 10.1,10.21.5.0 0.6.0 >=3.6 9.2, 10.1,10.21.4.0 0.5.0 ==2.7, >=3.5, <=3.8 9.2, 10.01.3.1原创 2020-08-28 16:06:57 · 21727 阅读 · 1 评论 -
正则匹配
def str_sub_find(strings, type_str = ‘EN’):‘’’提取字符串里指定字符‘’’if type_str == ‘CN’:return re.sub("[A-Za-z0-9!%[],\。]", “”, strings)elif type_str == ‘EN’:return ‘’.join(re.findall(r’[A-Za-z\d_.]’, s...原创 2020-04-21 10:04:44 · 178 阅读 · 0 评论 -
python assert
python assert断言是声明其布尔值必须为真的判定,如果发生异常就说明表达示为假。可以理解assert断言语句为raise-if-not,用来测试表示式,其返回值为假,就会触发异常。assert shape is not None, ('Please provide to Input either a shape’ ’ or a batch_shape argument. Note th...原创 2018-11-29 18:24:17 · 491 阅读 · 0 评论