
代码片段
!
風中塵埃
这个作者很懒,什么都没留下…
展开
-
pytorch代码示例笔记 -- Autograd
这篇博文是我记录学习pytorch的一些代码例子,我会时不时来看这些代码加深学习例子来自https://pytorch.org/tutorials/beginner/pytorch_with_examples.htmlimport torchimport mathdtype = torch.floatdevice = torch.device("cpu")x = torch.linspace(-math.pi, math.pi, 2000, dt原创 2020-12-30 01:43:19 · 448 阅读 · 4 评论 -
【代码备忘录】scrapy爬虫代码片段之xpath
def parse(self, response): groups = response.xpath('//*[@id="index"]/div[4]/div/div[1]/article') for group in groups: item = GeekParkItem() item['title'] = group.xpath('div[1]...原创 2019-01-06 01:07:45 · 217 阅读 · 0 评论