机器学习
文章平均质量分 54
机器学习
工科狗Niko
笔记在公主号,视频在B站,@工科狗Niko 分享学习干货,持续更新~nikohsu@qq.com
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【PyTorch深度学习实践】P9 kaggle otto商品分类作业(含注释)
《PyTorch深度学习实践》-刘二大人 Otto Group Product Classification作业 将商品进行十分类,输入为93个特征10个类别的商品数据集,输出为预测数据集里商品是哪个类别 数据集可以在https://www.kaggle.com/c/otto-group-product-classification-challenge下载 代码及注释如下 import numpy as np import pandas as pd from torch.utils.data import原创 2022-03-21 20:01:12 · 3035 阅读 · 2 评论 -
Pytorch自用基础知识笔记
0、导入和选择GPU import torch import numpy as np device="cuda" if torch.cuda.is_available() else "cpu" 1、张量的创建,格式和运算 z1=torch.empty(1) x2=torch.rand(5,3) x3=torch.zeros(5,3,dtype=torch.long) x4=torch.tensor([5,3]) print(x2,x3,x4) print(x3.dtype) torch.add(x2原创 2021-11-06 18:44:06 · 299 阅读 · 0 评论 -
TensorFlow初步-张量的基本运算
TensorFlow简介:https://tensorflow.google.cn/ 一. TensorFlow内的基本概念 图的构建 1.初始化图 tf.reset_default_graph() 用于清除默认图形堆栈并重置全局默认图形. 2.构建新的图 g1 = tf.Graph() g2 = tf.Graph() 3.在图中定义张量 with g1.as_default(): a = tf.constant([1.0, 1.0]) b = tf.constant([1.0, 1.0]) resu原创 2021-01-15 13:02:29 · 811 阅读 · 4 评论
分享