当前位置:网站首页>pytorch基础之 pytorch 模型开发模板
pytorch基础之 pytorch 模型开发模板
2022-08-11 05:13:00 【甜辣uu】
代码可以从0到1去实现一个深度学习项目。基本的模型 textcnn、cnn、lstm、bertd等
刚接触pytorch的小白学习使用学习。
注意:
转化成torch的方式 注意
self._x = torch.from_numpy(np.float32(train_data))
self._y = torch.from_numpy(np.float32(labels))
np.random.rand()生成的数据是float64的,而torch默认是float32,
feature = torch.from_numpy(np.float32())
模板文件包 基于textcnn的基因序列分类
pytorchtextcnpytorchtextcnpytorchtextcn开发模板-Python文档类资源-CSDN下载
常用的库导入 这些库在pytoch开发中会经常的用到
from collections import Counter
import torch
from torch import nn
from torch import optim
import math
import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn.metrics import f1_score
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_sp
边栏推荐
- oracle tablespace and user creation
- 元宇宙社交应用,靠什么吸引用户「为爱发电」?
- Tips to improve your productivity, you have to know - Navitcat shortcuts
- redis集群模式--解决redis单点故障
- 【嵌入式开源库】cJSON的使用,高效精简的json解析库
- Project Practice Lecture 27: Application of Status Mode in Duplicate Brands
- Switch and Router Technology-34-Dynamic NAT
- [ARM] rk3399 mounts nfs error
- nodes服务器
- 金仓数据库 KingbaseGIS 使用手册(6.8. 几何对象输入函数)
猜你喜欢
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/data/xxxx
Internet Protocol 1
Idea essential skills to improve work efficiency
分库分表ShardingSphere-JDBC笔记整理
C language antithesis: who is the murderer!
【嵌入式开源库】MultiButton的使用,简单易用的事件驱动型按键驱动模块
Paper Notes: BBN: Bilateral-Branch Network with Cumulative Learning for Long-Tailed Visual Recognition
nodes服务器
Switch and Router Technology - 36-Port Mirroring
Linux中安装redis
随机推荐
将double类型的数据转为字符串
金仓数据库 KingbaseGIS 使用手册(6.8. 几何对象输入函数)
CentOS7静默安装Oracle11g_转载
log4j2漏洞复现以及解决方案
StarUML使用心得
redis连接idea
关于CC 攻击
guava RateLimiter均匀限流
K8s Review Notes 7--K8S Implementation of Redis Standalone and Redis-cluster
Win10远程连接(实现多用户同时连接)
批量修改数据库等视频文件名称
Network Skill Tree
Optimization is a kind of habit low starting point is the "standing near the critical"
【嵌入式开源库】使用J-Link打印日志,让你节省一个打印串口
分库分表之sharding-proxy
2022煤矿瓦斯检查考试题模拟考试题库及答案
ARM Architecture 4: Embedded Hardware Platform Interface Development
Let's talk programming languages together
[ARM] rk3399 mounts nfs error
Thymeleaf