tensorflow pytorch keras 3.0

Pytorch中的交叉熵CE和均方误差MSE分别是如何计算的?

本文主要关注输入输出的形状,通过两种标签形式探索一下其计算机制。 交叉熵损失函数 实验设置:假设采用AutoEncoder+分类器。AE负责重构图像,计算MSE。分类器通过latent vector计算23个类别的概率向量。 import torch nn as nn net = AutoEncod ......
误差 Pytorch MSE

PyTorch项目源码学习(2)——Tensor代码结构初步学习

PyTorch版本:1.10.0 Tensor Tensor是Pytorch项目较为重要的一部分,其中的主要功能如存储,运算由C++和CUDA实现,本文主要从前端开始探索学习Tensor的代码结构。 结构探索 PyTorch前端位于torch目录下,从_tensor.py可以找到Tensor的pyt ......
源码 PyTorch 结构 代码 项目

使用PyTorch实现混合专家(MoE)模型

Mixtral 8x7B 的推出在开放 AI 领域引发了广泛关注,特别是混合专家(Mixture-of-Experts:MoEs)这一概念被大家所认知。混合专家(MoE)概念是协作智能的象征,体现了“整体大于部分之和”的说法。MoE模型汇集了各种专家模型的优势,以提供更好的预测。它是围绕一个门控网络 ......
模型 PyTorch 专家 MoE

安装pytorch/安装jupyterlab并添加已创建环境的kernel

安装pytorch 先创建一个环境,去pytorch官网查找环境所用python版本对应的torch版本,并选择合适的下载命令,在已激活的环境中运行命令,即可安装成功。 安装jupyter jupyter可以按cell运行代码,并且可以边写代码边做笔记。运行conda install jupyter ......
jupyterlab pytorch 环境 kernel

挑战Transformer的新架构Mamba解析以及Pytorch复现

今天我们来详细研究这篇论文“Mamba:具有选择性状态空间的线性时间序列建模” Mamba一直在人工智能界掀起波澜,被吹捧为Transformer的潜在竞争对手。到底是什么让Mamba在拥挤的序列建中脱颖而出? 在介绍之前先简要回顾一下现有的模型 Transformer:以其注意力机制而闻名,其中序 ......
Transformer 架构 Pytorch Mamba

Python中TensorFlow的长短期记忆神经网络(LSTM)、指数移动平均法预测股票市场和可视化|附代码数据

原文链接:http://tecdat.cn/?p=23689 最近我们被客户要求撰写关于LSTM的研究报告,包括一些图形和统计输出。 本文探索Python中的长短期记忆(LSTM)网络,以及如何使用它们来进行股市预测 ( 点击文末“阅读原文”获取完整代码数据)。 在本文中,你将看到如何使用一个被称为 ......

lazarus 3.0/fpc 3.3.1在windows交叉编译龙芯应用的方法

用fpcupdeluxe创建的龙芯交叉编译环境libc.so版本比UOS/loongxin等的版本高,导致编译后的应用不能运行的问题,按网友禁卫军提供的方法(Lazarus编译Loongarch64不能运行的情况 - 禁卫军 - 博客园 (cnblogs.com)和lazaurs自建库文件系统 - ......
lazarus windows 方法 3.0 fpc

TensorFlow社区与未来展望

在最后一天,我回顾了我的学习之旅,并介绍了TensorFlow社区。我分享了一些优秀的资源、博客和论坛,以及对TensorFlow未来发展的一些展望。我计划继续深入学习,关注TensorFlow的更新和新功能。这是一个关于十天学习TensorFlow的博客大致内容的示例: ......
TensorFlow 社区

PyTorch 的 BatchNorm 层

BatchNorm 层 为了实现输入特征标准化,batch norm 层会维护一个全局均值 running_mean 和全局方差 running_var。网络 train() 时进行统计,eval() 时使用统计值。 除此之外,可选 weight 权重和 bias 权重,这两个权重是会持续参与到网络 ......
BatchNorm PyTorch

Pytorch深度学习入门

一、配环境 创建环境 在Anaconda中输入 conda create -n pytorch python=3.6 ......
深度 Pytorch

鱼类识别系统Python+TensorFlow卷积神经网络算法模型+深度学习人工智能【计算机课设项目】

一、介绍 鱼类识别系统。使用Python作为主要编程语言开发,通过收集常见的30种鱼类('墨鱼', '多宝鱼', '带鱼', '石斑鱼', '秋刀鱼', '章鱼', '红鱼', '罗非鱼', '胖头鱼', '草鱼', '银鱼', '青鱼', '马头鱼', '鱿鱼', '鲇鱼', '鲈鱼', '鲍鱼' ......

SciTech-BigDataAIML-PyTorch: 安装PyTorch For Python3.12

安装PyTorch For Python3.12: Release Version: $ pip install torch torchvision torchaudio Pre-Release Version: $ pip install --pre torch torchvision torch ......

使用PyTorch实现去噪扩散模型

在深入研究去噪扩散概率模型(DDPM)如何工作的细节之前,让我们先看看生成式人工智能的一些发展,也就是DDPM的一些基础研究。 VAE VAE 采用了编码器、概率潜在空间和解码器。在训练过程中,编码器预测每个图像的均值和方差。然后从高斯分布中对这些值进行采样,并将其传递到解码器中,其中输入的图像预计 ......
模型 PyTorch

Load text: https://tensorflow.google.cn/tutorials/load_data/text

Tensorflow Load text: This tutorial demonstrates two ways to load and preprocess text. First, you will use Keras utilities and preprocessing layers. T ......
text tensorflow load_data tutorials google

tf.keras.layers.Embedding:

Turns positive integers(indexes) into dense vectors of fixed size. e.g. [[4], [20]] -> [[0.25, 0.1], [0.6, -0.2]] This layer can only be used on posit ......
Embedding layers keras tf

tf.keras.layers.Attention: Dot-product attention layer, a.k.a. Luong-style attention.

tf.keras.layers.Attention( View source on GitHub ) Dot-product attention layer, a.k.a. Luong-style attention. Inherits From: Layer, Module tf.keras.la ......

环境配置问题一些注意的点(Pytorch+cudnn)

1、先安装好Pycharm以及Anaconda 我使用的是Python3.6版本,所以下载了与Python3.6对应的Anaconda,Pycharm下载的是社区版; 2、cudnn版本:首先查看自己电脑NVIDIA版本,从任务管理器中查看GPU型号,再从cudnn官网下载相关配件; 3、在note ......
Pytorch 环境 问题 cudnn

Window10安装PyTorch

1、参考地址 https://blog.csdn.net/Mind_programmonkey/article/details/99688839 2、安装pytorch-gpu时,网络不好的话可以开手机热点,然后进行下载安装 activate conda activate python3.8 pip ......
PyTorch Window 10

pytorch反向传播错误解决:RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.

pytorch反向传播错误解决: 错误: RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=T ......
backward the graph time RuntimeError

python(pytorch)学习中的法宝

1、dir():打开、查看 比方在Pycharm中输入dir(torch),就可以输出torch中所有的使用方法(函数) 2、help(函数名):对于新手来讲很有用,函数不知道怎么用的时候,可以用该函数调出函数的使用参考。 3、dataset:提供一种方式去获取数据及其label(如何获取每一个数据 ......
法宝 pytorch python

Pytorch distributed overview

torch.distributed 包 v1.6.0后包括三个主要的部分: 1.Distributed Data-Parallel Training(DDP):单程序多数据训练范式。模型被复制到每个进程中,每个模型副本被提供一组不同的输入数据,并将其梯度计算累加以加快训练速度。(collective ......
distributed overview Pytorch

深度解析 PyTorch Autograd:从原理到实践

本文深入探讨了 PyTorch 中 Autograd 的核心原理和功能。从基本概念、Tensor 与 Autograd 的交互,到计算图的构建和管理,再到反向传播和梯度计算的细节,最后涵盖了 Autograd 的高级特性。 关注TechLead,分享AI全维度知识。作者拥有10+年互联网服务架构、A ......
深度 Autograd 原理 PyTorch

使用pytorch构建图卷积网络预测化学分子性质

在本文中,我们将通过化学的视角探索图卷积网络,我们将尝试将网络的特征与自然科学中的传统模型进行比较,并思考为什么它的工作效果要比传统的方法好。 https://avoid.overfit.cn/post/7cfa0930651b4b4cac912952d8c53d54 ......
图卷 分子 性质 pytorch 化学

基于Pytorch的网络设计语法4

import torch.nn as nn import torch.functional as F import torch.optim as optim from collections import OrderedDict class Net4(nn.Module):# 从nn.Module ......
语法 Pytorch 网络

基于Pytorch的网络设计语法3

import torch.nn as nn import torch.functional as F import torch.optim as optim from collections import OrderedDict class Net3(nn.Module):# 从nn.Module ......
语法 Pytorch 网络

基于Pytorch的网络设计语法2

import torch.nn as nn import torch.functional as F import torch.optim as optim from collections import OrderedDict class Net2(nn.Module):# 从nn.Module ......
语法 Pytorch 网络

基于Pytorch的网络设计语法1

第一种语法: 层层堆叠 import torch.nn as nn import torch.functional as F import torch.optim as optim from collections import OrderedDict class Net1(nn.Module):# ......
语法 Pytorch 网络

【pytorch深度学习报错】AttributeError: module 'torch' has no attribute '_six'

1.AttributeError: module 'torch' has no attribute '_six'报错: 答:指的是安装的pytorch版本里面没有_six.py文件,因为在pytorch2.0版本以后不在具有此文件。 2.两个解决方法 答:①将2.0版本以前的_six.py文件复制到 ......
39 AttributeError attribute 深度 pytorch

SciTech-BigDataAIML-Tensorflow-Introduction to modules, layers, and models

Introduction to modules, layers, and models Model: To do machine learning in TensorFlow, you are likely to need to define, save, and restore a model. ......

SciTech-BigDataAIML-Tensorflow-Introduction to graphs and tf.function

Graphs are data structures that contain: a set of tf.Operation objects, which representing units of computation; and tf.Tensor objects, which represen ......
共940篇  :1/32页 首页上一页1下一页尾页