上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 作者:昆特Alex 链接:https://www.zhihu.com/question/455063660/answer/2570541435 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 import torch import torch.nn as nn fr 阅读全文
posted @ 2022-07-21 16:20 15375357604 阅读(290) 评论(0) 推荐(0) 编辑
摘要: import torch import torch.nn as nn from transformers import AutoTokenizer, AutoModel class Config(object): def __init__(self): self.pre_bert_path="ngh 阅读全文
posted @ 2022-07-21 15:55 15375357604 阅读(37) 评论(0) 推荐(0) 编辑
摘要: #pack_padded_sequence,pad_sequence的代码 import torch from torch.utils.data import Dataset,DataLoader from torch.nn.utils.rnn import pack_padded_sequence 阅读全文
posted @ 2022-04-28 20:08 15375357604 阅读(16) 评论(0) 推荐(0) 编辑
摘要: pyspark的一些函数: df.select('age', 'mobile').show(10) df.filter(df['mobile']=='Vivo').show() df.filter((df['mobile']=='Vivo')&(df['experience'] >10)).show 阅读全文
posted @ 2022-04-02 11:27 15375357604 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 推荐场景一般可以抽象为:内容(Item)和受众(User),其中内容主要是指要推荐的Item,在购物场景中Item就是商品,歌曲推荐中Item就是歌曲,受众是访问当前场景的用户,一般是自然行为人;推荐模型一般是计算不同的User-Item对的得分,这个得分反映的是用户点击当前物品的概率,获取得分最高 阅读全文
posted @ 2022-04-02 11:07 15375357604 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 前言 记得我入算法这一行的第一份工作面试的时候,最终的boss面的面试官是前微软工程院的副院长。面试进行得很顺利,不免向前院长卖弄一番,谈了谈我对算法的理解。我说算法工程师就好比厨师,模型是灶上功夫,而数据预处理+特征工程就好比刀工。再好的食材,不切不洗,一古脑地扔下锅,熟不熟都会成问题,更甭提味道 阅读全文
posted @ 2022-04-01 14:18 15375357604 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 注意点1:def bare_except(): while True: try: s = input("Input a number: ") x = int(s) break except: # oops! can't CTRL-C to exit print("Not a number, try 阅读全文
posted @ 2021-12-10 11:02 15375357604 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 析构函数简介 它的作用与构造函数相反,一般是执行对象的清理工作,当对象的生命周期结束的时候,会自动的调用。析构函数的作用并不是删除对象,在对象撤销它所占用的内存之前,做一些清理的工作。清理之后,这部分内存就可以被系统回收再利用了。在设计这个类的时候,系统也会默认的提供一个析构函数。在对象的生命周期结 阅读全文
posted @ 2021-09-30 17:24 15375357604 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 在python2环境下: response.text是unicode数据类型,而response.content是字符串类型 python2环境下数据类型 分别查看response.text和response.content的内容 接下来分别print response.text和response. 阅读全文
posted @ 2020-08-03 18:48 15375357604 阅读(871) 评论(0) 推荐(0) 编辑
摘要: 数据分析系列(一):Hive(随机,优化) https://blog.csdn.net/weixin_39053313/article/details/88921290 阅读全文
posted @ 2020-07-15 11:04 15375357604 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 下一页