摘要:
Python 正则表达式¶ In [1]: import re pattern = re.compile(r'hello.*\!') print(pattern) match = pattern.match('hello,World! how are you?') if match: print(m 阅读全文
摘要:
#Tensor索引操作 ''''' Tensor支持与numpy.ndarray类似的索引操作,语法上也类似 如无特殊说明,索引出来的结果与原tensor共享内存,即修改一个,另一个会跟着修改 ''' import torch as t a = t.randn(3,4) '''''tensor([[ 阅读全文