自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ubuntu下创建软件图标和直接点文件打开

ubuntu中有一些从github上下载的软件或者是appimage软件,能够使用,但是不在应用程序中显示,也不能设置为默认打开程序以cajviewer为例子,下下来是CAJViewer-x86_64-buildubuntu1604-210401.AppImage1.设置图标打开目录/usr/share/applications可以看到有很多desktop图标sudo gedit caj_viewer.desktop[Desktop Entry]Name = caj_viewerType =

2021-10-18 16:40:14 331

原创 Ubuntu下绘图软件krita64位无中文问题

ubuntu20sudo apt install krita-l10n就有了参考:https://bbs.deepin.org/post/181669

2021-10-13 16:35:16 457

原创 ubuntu挂起唤醒后十几秒钟就自动熄屏一次

昨天晚上笔记本没关机,ubuntu挂起一晚上,今天早上打开电脑,发现每过十几秒钟就自动熄屏一次,重启之后好了,不知道什么原因搜索了一下说可能是DPMS的问题,用xset -dpms可以关闭电源管理选项考虑设置一下电源管理选项各项时间,弄长一点,看有没有用xset -dpms x x x可以设置Standby,Suspend,Off这三个时间...

2021-08-07 09:28:17 722

原创 fastai学习:08_collab Questionnaire

1.What problem does collaborative filtering solve?One very common problem to solve is when you have a number of users and a number of products, and you want to recommend which products are most likely to be useful for which users. There are many variation

2021-06-23 10:52:03 231

原创 ubuntu中使用firefox浏览器播放bilibili的h5网页视频

安装好系统后,直接firefox打开bilibili显示没有flash插件找了一圈没有发现自动播放h5的选项搜索了一下发现可能是需要解码器sudo apt-get install ubuntu-restricted-extras就能看了

2021-06-23 10:26:46 8755 4

原创 fastai学习:06_multicat Questionnarie

1.How could multi-label classification improve the usability of the bear classifier?可以对不存在的熊进行分类2.How do we encode the dependent variable in a multi-label classification problem?One-hot encoding: Using a vector of zeros, with a one in each location that

2021-06-07 15:25:07 117

原创 fastai学习:05_pet_breeds Questionnaire

1.Why do we first resize to a large size on the CPU, and then to a smaller size on the GPU?首先,在训练模型时,我们希望能够将图片的尺寸统一,整理为张量,传入GPU,我们还希望最大限度地减少执行不同增强计算的数量。其次,在进行图片尺寸调整时,常见的数据增强方法可能会引起引入虚假空白数据,使数据降维的问题。2.If you are not familiar with regular expressions, find

2021-06-04 10:19:30 140

原创 fastai学习:04_mnist_basics Questionnaire

1.How is a grayscale image represented on a computer? How about a color image?灰度图:单通道,0-256彩色图:三通道RGB或HSV,0-2562.How are the files and folders in the MNIST_SAMPLE dataset structured? Why?分为训练集和测试集,分别包含3和7文件夹,文件夹中为手写数字的图像3.Explain how the "pixel simila

2021-06-02 16:35:04 272

原创 fastai学习:02_production Questionnaire

1.Where do text models currently have a major deficiency?Deep learning is currently not good at generating correct responses! We don’t currently have a reliable way to, for instance, combine a knowledge base of medical information with a deep learning mod

2021-05-13 10:20:51 203

原创 fastai学习——第二个问题

第二节课需要使用bing image search api获取bing图片搜索中的熊图片,此时发现获取api需要注册azure,卡在绑定卡上很久,想了想还要去弄一张带visa的卡,还是算了,就用猫狗大战数据集实验吧,按照与学习视频中类似的方式划分文件夹,没发现啥问题...

2021-05-12 10:43:45 140

原创 fastai学习:01_intro Questionnaire

fastAI class 1 习题1.Do you need these for deep learning? Lots of math T / F Lots of data T / F Lots of expensive computers T / F A PhD T / FF F F F2.Name five areas where deep learning is now the best in the world.自然语言学习(NLP),计算机视觉(CV),

2021-05-10 17:26:45 434

原创 fastai学习——第一个bug

跟着视频学习,在运行第一段测试代码的时候出现问题from fastai.vision.all import *path = untar_data(URLs.PETS)/'images'def is_cat(x): return x[0].isupper()dls = ImageDataLoaders.from_name_func( path, get_image_files(path), valid_pct=0.2, seed=42, label_func=is_cat, item

2021-05-10 09:21:19 301

原创 fastai学习笔记——安装

虽然说是推荐linux,windows可能有bug,但是我还是没办法只用linuxwin10+anacondapython=3.7安装很简单conda install -c fastchan fastai anaconda好了也没发现有啥问题测试torch是否可用import torchcuda.test.is_available()True...

2021-05-10 09:11:29 915

原创 发现了imageio文档中有代替scipy.misc的说明

原文:https://imageio.readthedocs.io/en/latest/scipy.html?highlight=imreadimageio.imread可以代替scipy.misc.imread用pilmode代替mode用as_gray代替flattenpilmode类型:‘L’ (8-bit pixels, grayscale)‘P’ (8-bit pixels, mapped to any other mode using a color palette)‘RGB’ (

2020-11-09 16:07:20 861

原创 tf.contrib在tf2中无法使用

在尝试文献中代码时发现tf.comtrib无法使用官方文档中说It is still possible to run 1.X code, unmodified (except for contrib), in TensorFlow 2.0:import tensorflow.compat.v1 as tftf.disable_v2_behavior()除了contrib应该都用能两行代码解决问题,contrib则用keras.layers代替model = tf.keras.Sequentia

2020-11-02 17:35:39 3653 1

原创 anaconda中tensorflow-estimator版本应与tensorflow-gpu版本相同

把tensorflow升级到2.1.0版本是发现import tensorflow as tf出错发现是anaconda安装的tensorflow-estimator版本是2.2.0,将版本回退到2.1.0后解决了问题

2020-11-01 16:18:12 5471 1

原创 新版scipy中的imread,imsave,imresize被弃用解决方法

阅读文献代码时发现新版scipy中的imread,imsave,imresize被弃用报错搜索了一下发现可以用imageio中的imread和imsave代替原有的,用numpy的reshape来代替imresize试了一下,不太行,文献中imread有mode=‘L’,即读取灰度图,用imageio的话需要加上as_gray=True,resize不是简单的变形,而是有一个邻近差值interp=“nearest”,reshape貌似并不能完全解决这个问题尝试了一下,感觉全部用pillow读取和处理

2020-10-23 09:32:29 2777

原创 数字图像处理基础与应用 第五章

5-1感觉这些方法主体都差不多,就是微分算子不同,懒得一个个写了from cv2 import cv2import numpy as npimport randomdef singleDirectionsharpen(img, N=3): p = N // 2 img_shape = np.shape(img) out = np.zeros(img_shape) for i in range(img_shape[0]): for j in rang

2020-10-04 17:15:47 180 1

原创 数字图像处理基础与应用 第四章

3-1(1) 感觉就是图像模糊了,并没有去噪from cv2 import cv2import numpy as npimport randomdef spNoise(img,prob): # 添加椒盐噪声,prob:噪声比例 output = np.zeros(img.shape,np.uint8) thres = 1 - prob for i in range(img.shape[0]): for j in range(img.shape

2020-10-04 16:32:34 228 1

原创 数字图像处理基础与应用 第三章

3-1from cv2 import cv2import numpy as npdef linearBroader(img, tarmax, tarmin, curmax=0, curmin=0): img_shape = np.shape(img) img_flatten = img.flatten() curmax = max(img_flatten) curmin = min(img_flatten) for i in range(len(img_fla

2020-10-02 15:03:54 230

原创 数字图像处理基础与应用学习,第二章

计算灰度直方图和RGB三个通道的灰度直方图Tips1.计算灰度cv2.calcHist(images, channels, mask, histSize, ranges[, hist[, accumulate ]])imaes:输入的图像channels:选择图像的通道mask:掩膜,是一个大小和image一样的np数组,其中把需要处理的部分指定为1,不需要处理的部分指定为0,一般设置为None,表示处理整幅图像histSize:使用多少个bin(柱子),一般为256ranges:像素值的范

2020-09-28 16:42:19 131

原创 C++PrimerPlus学习——第十七章编程练习

17-1不知道有没有理解错题意,参考list17.14#include <iostream>int main(){ using std::cout; using std::cin; using std::endl; char ch; int count = 0; while (cin.peek() != '$') { cin.get(ch); count++; cout << ch; } cout << "\nThere are

2020-05-27 17:01:01 315

原创 C++PrimerPlus学习——第十六章编程练习

16-1#include <iostream>#include <string>using namespace std;bool IsPalindrome(string str){ int len = str.size(); for (int i = 0; i < len / 2; i++) { if (str[i] != str[len - i - 1]) return false; } return true;}int main(){

2020-05-24 16:39:10 289

原创 C++PrimerPlus学习——第十五章编程练习

15-1tv.h#ifndef TV_H_#define TV_H_#include <iostream>>class Remote;class Tv{public: friend class Remote; enum { Off, On }; enum { Minval, Maxval }; enum { Antenna, Cable }; enum { TV, DVD }; Tv(int s = Off, int mc = 125) :state(s)

2020-05-22 23:55:00 332

原创 C++PrimerPlus学习——第十四章编程练习

14-1参考14.19winec.h#ifndef WINEC_H_#define WINEC_H_#include <string>#include <valarray>using std::string;template<class T1, class T2>class Pair{private: T1 year; T2 bottles;public: Pair() {}; Pair(const T1 y, const T2 b) :

2020-05-20 16:17:44 451

原创 C++PrimerPlus学习——第十三章编程练习

13-1注意char*前面加const,不然就会报错Classis.h#ifndef CLASSIC_H_#define CLASS_H_#include <string>class Cd {private: char performers[50]; char label[20]; int selections; double playtime;public: Cd(const char* s1, const char* s2, int n, double x); C

2020-05-17 23:50:35 280

原创 C++PrimePlus学习——第十二章编程练习

12-1Cow.h#ifndef COW_H_#define COW_H_class Cow { char name[20]; char* hobby; double weight;public: Cow(); Cow(const char* num, const char* ho, double wt); Cow(const Cow& c); ~Cow(); Cow& operator=(const Cow& c); void ShowCow() con

2020-05-14 19:24:15 360 1

原创 C++PrimerPlus学习——第十一章编程练习

11-1应该是修改list11.15,当当官方店买的,难道是盗版书吗。。。打开file之后,操作跟cout类似vect.h#ifndef VECT_h_#define VECT_h_#include <iostream>namespace VECTOR{ class Vector { public: enum Mode { RECT, POL }; private: double x; double y; double mag; double ang;

2020-05-12 18:47:26 385 1

原创 C++PrimerPlus学习——第十章编程练习

10-1Bank.h#ifndef Bank_h_#define Bank_h_#include<cstring>class BankAccount{private: char name[40]; char acctnum[25]; double balance;public: BankAccount(const char* client, const char* num, double bal = 0.0); void show(void) const; void

2020-05-11 12:34:13 377

原创 C++PrimerPlus学习——第九章编程练习

前两天有事情去了,没有好好学,之后要补回来9-1main.cpp#include <string.h>#include <iostream>#include"golf.h"const int GolfSize = 3;int main(){ golf ann; setgolf(ann, "Ann Birdfree", 24); showgolf(an...

2020-05-08 16:18:57 187 2

原创 C++PrimerPlus学习——第八章编程练习

8-1#include <iostream>#include <string>void show_string(std::string str, int i = 0);int main(){ using namespace std; string str; int n = 1; cout << "Enter a string: "; ci...

2020-05-05 22:22:11 404

原创 C++PrimerPlus学习——第七章编程练习

感觉变困难了很多,必须要注意细节,不如就会出各种bug7-1#include <iostream>double average(double a, double b);int main(){ using namespace std; double a, b; a = b = 0; cout << "Enter ta number:" << ...

2020-05-04 18:42:23 540

原创 C++PrimerPlus学习——第六章编程练习

6-1有个问题,如果输入的字符既不是数字也不是字母是不是应该原样输出呢?#include <iostream>#include <cctype>int main(){ using namespace std; char ch; cout << "Please enter something.\n"; while (cin.get(ch) &a...

2020-05-03 22:32:09 201

原创 C++PrimerPlus学习——第五章编程练习

5-1#include <iostream>int main(){ using namespace std; int i, j; int sum_ij = 0; cout << "Entet two numbers. Enter the smaller number: "; cin >> i; cout << endl <&...

2020-05-02 17:27:02 213

原创 C++PrimerPlus学习——第四章编程练习

**疫情期间学习C++4-1需要使用cin.get()设置读取位数,避免空格导致无法读取多个词#include <iostream>struct info_people //define structure{ char first_name[20]; char last_name[20]; char grade; unsigned int age;};int ma...

2020-04-29 20:15:48 157

空空如也

空空如也

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

TA关注的人

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