![](https://img-blog.csdnimg.cn/51b9d21074b945e3985b2e75589168a8.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
paddle
百度飞桨框架的使用记录
吴天德少侠
这个作者很懒,什么都没留下…
展开
-
paddle2.x报错The type of data we are trying to retrieve does not match the type of data currently cont
接收的类型不一致,训练时的数据类型是。这个一般是自定义的数据类型与。原创 2023-04-12 09:16:16 · 485 阅读 · 0 评论 -
paddle实现3层msa的vision transformer
import paddleimport numpy as npimport paddle.nn as nnclass PatchEmbedding(nn.Layer): def __init__(self,image_size,patch_size,in_channels,embed_dim,dropout=0.0): super().__init__() self.embed_dim = embed_dim n_patches = (i..原创 2022-02-19 11:23:11 · 551 阅读 · 0 评论 -
win10安装cython-bbox
直接pip install 安装失败使用:python -m pip install git+https://github.com/yanfengliu/cython_bbox.git安装成功。原创 2021-12-16 16:38:45 · 1234 阅读 · 2 评论 -
numpy.ndarray has the wrong size, try recompiling.
在安装paddledetection测试的时候出现numpy.ndarray has the wrong size, try recompiling.,但是明明依赖已经装好了。出现这个原因是Python 包的版本问题,例如安装了较旧版本的 Numpy,但安装了较新版本的 Pandas。使用pip install numpy -U升级numpy即可...原创 2021-12-16 16:35:57 · 4238 阅读 · 0 评论 -
paddle2.2使用LeNet训练手写数字集
LeNet的实现在这篇文章里,使用该网络结构进行训练手写数字,保存每个epoch下的权重。import paddleimport numpy as npimport paddle.nn.functional as Ffrom paddle.vision.transforms import ToTensorfrom paddle.vision.datasets import MNISTfrom LeNet import LeNetdef train(model,opt,train_load原创 2021-11-10 14:55:16 · 787 阅读 · 0 评论 -
paddle2.2实现LeNet
LeNet结构:LeNet.pyimport paddleimport numpy as npfrom paddle.nn import Conv2D,MaxPool2D,Linearimport paddle.nn.functional as F# define LeNetclass LeNet(paddle.nn.Layer): def __init__(self,num_classes=1): super(LeNet, self).__init__(.原创 2021-11-10 13:57:39 · 779 阅读 · 0 评论