当前位置: 首页 > news >正文

上海商城网站制作公司做网站的服务器要什么格式

上海商城网站制作公司,做网站的服务器要什么格式,做系统进化树的网站,深圳龙华有几个区前言#xff1a; 昨天我们讲述了怎么利用emotion数据集进行deberta-v3-large大模型的微调#xff0c;那今天我们就来输入一些数据来测试一下#xff0c;看看模型的准确率#xff0c;为了方便起见#xff0c;我直接用测试集的前十条数据 代码#xff1a; from transfor…前言 昨天我们讲述了怎么利用emotion数据集进行deberta-v3-large大模型的微调那今天我们就来输入一些数据来测试一下看看模型的准确率为了方便起见我直接用测试集的前十条数据 代码 from transformers import AutoModelForSequenceClassification,AutoTokenizer import torch import numpytokenizer AutoTokenizer.from_pretrained(deberta-v3-large) model AutoModelForSequenceClassification.from_pretrained(result/checkpoint-500,num_labels6)raw_inputs [im feeling rather rotten so im not very ambitious right now,im updating my blog because i feel shitty,i never make her separate from me because i don t ever want her to feel like i m ashamed with her,i left with my bouquet of red and yellow tulips under my arm feeling slightly more optimistic than when i arrived,i was feeling a little vain when i did this one,i cant walk into a shop anywhere where i do not feel uncomfortable,i felt anger when at the end of a telephone call,i explain why i clung to a relationship with a boy who was in many ways immature and uncommitted despite the excitement i should have been feeling for g etting accepted into the masters program at the university of virginia,i like to have the same breathless feeling as a reader eager to see what will happen next,i jest i feel grumpy tired and pre menstrual which i probably am but then again its only been a week and im about as fit as a walrus on vacation for thesummer ] inputs tokenizer(raw_inputs, paddingTrue, truncationTrue, return_tensorspt) outputs model(**inputs) print(outputs.logits.argmax(-1).numpy())output_tensor torch.softmax(outputs.logits, dim1)numpy.set_printoptions(suppressTrue, precision15) print(output_tensor.detach().numpy()) 标注结果 [0 0 0 1 0 4 3 1 1 3] 测试结果 [0 0 0 1 0 4 4 2 1 3] [[0.99185866 0.0011510316 0.00038844926 0.0026896652 0.00296234010.00094986777][0.9918577 0.0011512033 0.00038886679 0.0026923663 0.00295853150.000951257 ][0.99185807 0.0011446937 0.00038163515 0.0026456509 0.00303544850.00093440723][0.00041773843 0.9972398 0.0014854104 0.0002909223 0.000362315240.00020376328][0.99185014 0.0011451623 0.00038086114 0.0026396883 0.00305240350.00093187904][0.015044774 0.0025362356 0.00041989447 0.015223678 0.950097140.016678285 ][0.11319714 0.030935207 0.007336047 0.3035547 0.475454330.069522515 ][0.0011094044 0.18334262 0.8081213 0.0011003793 0.00072979650.005596481 ][0.0004444314 0.9972433 0.0014491597 0.00028465112 0.000374119760.00020446534][0.00241266 0.00079152075 0.00092184055 0.9924028 0.00241092480.0010602956 ]] 结果对比 除了第七、第八条数据错误外其他的八条数据都是正确的 代码解释 1、raw_inputs用户输入的数据这个地方你可以使用一个while循环然后使用input来与用户进行交互需要注意的是这个必须是一个数组哪怕用户只输入了一句文本。 2、return_tensorspt表示tokenizer返回的是PyTorch格式的数据 3、argmax(-1)将logits属性中的浮点数张量沿着最后一个轴即-1轴进行argmax操作从而找到该张量中最大值所对应的标签编号。 4、softmax(outputs.logits, dim1)dim指沿着哪个维度计算softmax通常指定为1表示对每一行进行softmax操作。如果不指定则默认在最后一维计算softmax。 5、numpy.set_printoptions(suppressTrue, precision15)使用 numpy.set_printoptions() 函数来设置打印选项从而调整打印输出格式。其中suppress 选项可以关闭科学计数法precision 选项可以设置打印精度。
http://www.hkea.cn/news/14270909/

相关文章:

  • 企业网站设计源代码朝阳网站开发联系电话
  • 深圳市宝安网站建设中国最新军事武器
  • 微信公众上传wordpress石家庄百度提升优化
  • 折800网站模板qq上如何做文学网站
  • 上行10m企业光纤做网站自己做网站需不需要钱
  • 网站备案 建设方案书网站域名购买com
  • 漳州网站建设技术海南省建设执业资格管理中心网站
  • 网站做等级测评外贸推广方式有哪些
  • 游仙建设局官方网站闲置服务器做网站挣钱
  • 精品建站教程线上营销策略有哪些
  • 网站建设费用有哪些工厂招工信息
  • 网站建设与开发是什么岗位宝安新闻最新消息今天
  • 重庆市中心在哪个区seo关键词选取工具
  • 自己做一网站_多做宣传.可视化小程序开发工具
  • 网站图片上传不上去怎么办做网站要求高吗
  • 什么网站是专门做评论赚钱的商业空间设计案例ppt模板
  • 网站建设合同细节网站留言板设计代码
  • 政务信息网站的建设的意义手机登录凡科网
  • 增城免费网站建设wordpress修改了文件后前端不生效
  • 四川华海建设集团有限公司网站成都双语网站开发
  • 怎么做网站用于推广科技大崛起
  • 加强普法网站建设的通知网页设计个人页面
  • 企业网站设计建设服务建立生态产品
  • 博宇娱乐网站建设建筑工程公司名字起名大全
  • 金色财经网站开发dede网站地图文章变量
  • 汽车精品网站建设钓鱼网站制作的报告
  • 网站的运营模式建网站一般需要多少钱
  • 网站推广建站企业做增资 网站平台
  • 成都哪家做网站怎么做网站的移动端适配版
  • 吉林高端网站建设ios wordpress 编辑器