自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 收藏
  • 关注

原创 Anaconda UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb4 in position 0: invalid start byte

Anaconda Navigator 启动卡在 Loading Application,报错:utf8 code can't decode...

2022-07-18 11:53:06 3979 4

原创 pyinstaller 打包 matplotlib:Failed to execute script ... WindowsPath ... matplotlibrc

本文记述 pyinstaller 打包 matplotlib 遇到的问题与解决方案,包括:Failed to execute scriptTypeError: expected str, bytes or os.PathLike object, not WindowsPathNo such file or directory matplotlibrcFailed to determine matplotlib's data directory

2022-02-15 14:23:18 1335 1

原创 PyQt 和 Matplotlib 展示 LaTeX

PyQt 和 Matplotlib 渲染 LaTeX

2022-02-15 13:06:55 1597

原创 超详细VSCode 配置 C语言环境 (或 C++) Windows 64位

VSCode 运行 C 或 C++

2022-01-12 00:27:04 2578 1

原创 C++ 判断类型的结构体 __are_same

文章目录__are_same__are_same<T1,T2>C++模板template的存在,为重载函数提供了很多方便。但有些时候我们要对不同的类型作不同的处理(比如整型与浮点型、实数与复数)。比如我要实现如下函数:f(x)={x+1,x是int型,x,x非int型.f(x)=\left\{ \begin{array}{ll} x+1 & ,x是int型, \\ x & ,x非int型.

2021-11-16 16:16:48 1644

原创 多项式卷积、FFT与高精度乘法

文章目录多项式卷积快速傅里叶变换高精度乘法多项式卷积快速傅里叶变换高精度乘法

2021-09-20 18:19:30 372

原创 tensorflow.keras 2.x版本DeepDream图像处理实战

文章目录库的导入模型建立构建Loss函数辅助函数实验测试本文是个人对《Deep Learning with Python》一书的学习笔记。使用 VSCode 下的 ipynb (python notebook, python 3.8.4 64-bit).由于原书的代码使用的tensorflow,keras,scipy的版本较为古老,在新版本(tensorflow 2.x 等)条件下已无法直接运行。经过不断调整后代码能成功在新的版本下运行。库的导入先来看一下使用的库及版本。import tens

2021-08-20 16:36:17 804

原创 tensorflow.keras实现IMDB情感分类实战

文章目录数据准备数据预处理模型训练训练效果可视化实验测试Embedding可视化本文是个人对《Deep Learning with Python》一书的学习笔记。使用 VSCode 下的 ipynb (python notebook).数据准备在 http://mng.bz/0tIo 下载IMDB数据集(57.9MB)并解压。在 \acllmdb\train 路径下,\neg 文件夹中存有 12500 个对电影的负面评价txt, \pos 文件夹中存有 12500 个对电影的正面评价txt.读取所有

2021-08-17 00:25:54 822

原创 template argument deduction/substitution failed: couldn‘t deduce template parameter 解决方案

文章目录报错代码报错原因解决方案报错代码希望实现一个找到区间最大值的泛型函数,参数是左右迭代器,返回最大值。#include<iostream>#include<vector>using namespace std;template<class T>T findmax(typename vector<T>::iterator left,typename vector<T>::iterator right){ T ret = *

2021-07-26 22:56:41 8178

原创 cwchar:179:11: error: ‘::wcscat‘ has not been declared

文章目录报错代码报错原因解决方案报错代码写一个类,为了方便把测试用的main函数写在同一个文件中。#ifndef _STRING_H#define _STRING_H#include<vector>#include<iostream>using namespace std;class myStr{ vector<char> data;public: myStr(const char* s=NULL){ for (;s&

2021-05-13 21:55:33 508

原创 池化层的反向传播

文章目录前向传播平均池化最大池化反向传播平均池化最大池化神经网络的池化层一般是没有参数更新的,但是它仍旧要参与反向传播的参数传递。那应该怎么传递呢?前向传播平均池化和最大池化是两种较为常见的池化方式。先来回顾一下池化层的前向传播方式。以输入 3x3, 池化核 2x2 为例,(无填充(padding))则输出为 2x2平均池化[x11x12x13x21x22x23x31x32x33]→[x11+x12+x21+x224x12+x13+x22+x234x21+x22+x31+x324x22+x2

2021-05-04 00:00:02 430

原创 优雅地理解神经网络反向传播 —— 将每一层视作对象

文章目录主要代码前向传播反向传播参数更新用过tensorflow等的都知道,神经网络不同的 Layers 像拼图一样几乎可以随心所欲地拼接。每一个层相当于一个对象,可以实现前向传播、反向传播、参数更新,只需要按顺序调用它们就行了。那么,如果试图使用纯 numpy 写这样的神经网络,是怎么实现的呢?主要代码想要实现一个名为Neuro的神经网络类, structs是一个由层(Layer)构成的列表。每一个层(Layer)都能被调用 forward, backward, update 三个函数进行前向传

2021-04-13 23:23:13 261

原创 python包模块内部调用 No module named

文章目录报错代码报错原因解决方案报错代码在以下目录结构中写一个名为 cal 的包,内有 calPrime.py 和 isPrime.py 两个模块其中:isPrime.py:(作用是判断一个正整数是否为质数)def judgePrime(n): if n < 5: return [False,False,True,True,False,True][n] for i in range(2,int(n**0.5)+1): if n%i == 0 : return

2021-04-11 11:28:01 648

原创 qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in ““解决方案

文章目录报错原因解决方案报错在 import PyQt5 并使用时,出现以下错误:qt.qpa.plugin: Could not find the Qt platform plugin “windows” in “”This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.原因Qt所

2021-04-03 17:07:00 13292 3

原创 神经网络权重不更新与初始化

神经网络权重不更新与初始化文章目录神经网络权重不更新与初始化问题代码原因分析1.初始化权重全为02.初始化权重全相等解决问题在手敲神经网络进行训练时,发现神经网络权重w并没有更新。代码主要代码如下(activations.activator 是用来返回激活函数的函数指针的)import activationsimport numpy as npimport pandas as pdclass Neuro(): def __init__(self,cellnum,learning

2021-03-27 23:43:42 1953 1

原创 cannot bind non-const lvalue reference of type ‘xxx&‘ to an rvalue of type ‘xxx‘

文章目录报错代码报错原因解决方案报错代码#include<iostream>using namespace std;class Complex{private: double r,i;public: Complex(double _r,double _i=0):r(_r),i(_i){} double re() {return r;} double im() {return i;} void print(){ cout <

2021-03-25 22:04:07 3418

原创 passing ‘const xxx‘ as ‘this‘ argument discards qualifiers [-fpermissive]

文章目录报错代码报错原因解决方案报错代码#include<iostream>using namespace std;class Complex{private: double r,i;public: Complex(double _r,double _i=0):r(_r),i(_i){} double re() {return r;} double im() {return i;} void print(){ cout <

2021-03-25 21:58:39 628

原创 std::bad_alloc,运算符重载与临时变量

文章目录报错代码报错原因解决方案报错代码写一个复数类 Complex ,支持加号重载:#include<iostream>using namespace std;class Complex{private: double r,i;public: Complex(double _r,double _i=0):r(_r),i(_i){} double re(){return r;} double im(){return i;} void prin

2021-03-25 21:30:06 1365

原创 no match for ‘operator-‘ (operand types are ‘std::_List_iterator<int>‘std::__lg(__last - __first) *2

文章目录报错代码报错原因解决方案报错代码#include<iostream>#include<list>#include<random>#include<algorithm>using namespace std;int main(){ list<int> a; for (int i=0;i<10;++i) a.push_back(rand()); for (auto num: a) cout <&

2021-03-23 20:09:20 3554

原创 undefined reference to xxx 多文件编译链接 解决方案

文章目录报错代码报错原因解决方案报错代码同一个文件夹中三份文件:main.cpp, add.cpp, add.hmain.cpp 内容如下:#include<iostream>#include"add.h"using namespace std;int main(){ cout << add(3,4) << endl; system("pause"); return 0;}add.cpp 内容如下:#include"add.h

2021-03-23 19:50:02 1800 1

原创 reference to non-static member function must be called 解决方案

目录报错代码报错原因解决方案报错代码#include<iostream>#include<vector>#include<algorithm>using namespace std;class Sol{public: bool cmp(int a,int b){ return a < b; } void mysort(vector<int>& a){ sort(a.begin(),a.end(),

2021-03-04 17:03:25 735 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除