读代码
文章平均质量分 89
大烤翅
这个作者很懒,什么都没留下…
展开
-
搭建深度学习网络时常用的一些pytorch函数:view(),softmax(),FloatTensor(),zero_(),scatter_(),gather(),sum(),clamp(),log
目录torch.view()torch.nn.functional.softmax()torch.FloatTensor()torch.Tensor.zero_()torch.Tensor.scatter_()torch.gather()torch.sum()torch.clamp()torch.log()参考pytorch说明文档:torch文档torch.view()返回一个数据相同但大小不同的tensor。 返回的tensor必须有与原te...原创 2022-04-06 18:23:16 · 1176 阅读 · 0 评论 -
读代码:geo_prior(2)
utils.pyencode_loc_timedef encode_loc_time(loc_ip, date_ip, concat_dim=1, params=None): # assumes inputs location and date features are in range -1 to 1 # location is lon, lat if params['loc_encode'] == 'encode_cos_sin': feats = .原创 2021-09-24 21:25:29 · 187 阅读 · 0 评论 -
读代码:geo_prior
ReadMedemo.pyis a simple demo script that either 1)takes location as input and returns a prediction for all the categories predicted to be present at that location or 2)generates a dense prediction for a category of interest.原创 2021-09-24 18:00:11 · 260 阅读 · 0 评论