自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(76)
  • 资源 (1)
  • 收藏
  • 关注

原创 智能计算系统5.2智能编程语言性能优化实验

实验目的掌握使用智能编程语言优化算法性能的原理,掌握智能编程语言的调优方法。能够使用智能编程语言在DLP上加速矩阵乘法的计算。实验代码mlu_gemm16.cpp:Host端调用内核算子/************************************************************************* * Copyright (C) [2019] by Cambricon, Inc. * * Permission is hereby granted,

2021-06-10 14:42:47 1434

原创 智能计算系统4.3实时风格迁移的训练

实验目的掌握如何使用Tensorflow实现风格迁移算法的训练掌握使用Tensorflow定义损失函数的方法 掌握使用Tensorflow存储网络模型的方法 以实时风格迁移为例,掌握使用Tenflow进行神经网络训练的方法(推荐使用GPU进行训练)实验代码transform.py:定义基本运算单元#encoding=utf-8import tensorflow as tf, pdbWEIGHTS_INIT_STDEV = .1def net(image, type=0):

2021-06-10 14:00:45 3161 8

原创 智能计算系统实验3.3非实时图像风格迁移

实验目的使用Python语言numpy模块基于VGG19网络模型实现非实时图像迁移。加深对卷积神经网络的理解,利用VGG19模型进行图像特征提取。 使用numpy模块实现风格迁移中相关风格和内容损失函数的计算。实现layer2层的反向传播。 对卷积层和池化层实现中的四重循环进行改进(img2col+gemm),提升运算速度。实验代码layer_2.py:卷积层和池化层的基本实现和加速算法实现# coding:utf-8import numpy as npimport struct

2021-06-10 12:05:30 5798 7

原创 Ubantu20配置静态ip地址DNS服务器

参考博客:https://blog.csdn.net/fansnn/article/details/105930009其中yaml配置文件改为:# Let NetworkManager manage all devices on this systemnetwork: ethernets: enp34s0:#你的以太网 addresses: [x.x.x.x/24] dhcp4: yes optional

2020-10-18 22:11:11 641

原创 python+selenium实现自动联网认证,并实现断网重连

背景大家是不是有觉得认证联网比较烦的时候,尤其是当在服务器上断网时,还需要认证联网,而此时你又不再服务器边上,对于需要使用服务器的你来说,简直是噩梦。本文基于python+selenium模拟联网,并通过脚本每隔一段时间,ping一次百度,检查网络状态,当断网时自动重连。开始环境搭配参考:https://www.cnblogs.com/jjstrip/p/11670747.ht...

2020-01-13 21:59:39 1743 2

原创 win10使用vscode远程管理Linux服务器上项目

说明最近使用服务器显卡进行项目开发,使用xftp进行文件传输,开发效率很低,尝试使用一款比较好用的软件,连接服务器的项目目录,进行远程编辑,就相当于本地开发了:开始1. 下载安装vscode,打开,找到左侧Extensions(ctrl + Shift + X), 搜索Remote SSH,安装2. 左下角Manage按钮,选择Command Paleten 3...

2020-01-02 17:37:22 1252 1

原创 nvida/cuda容器编译Caffe踩坑记录(Ubantu16.04+CUDA10.2)

背景最近再学caffe,同时想自己编译下,了解了解过程。使用docker容器,利用官方cuda镜像,进行caffe编译,了解编译过程,踩坑记录。编译使用cmake。编译caffe-python接口。官方镜像#查找cuda镜像docker search cudadocker pull nvidia/cuda注意cuda镜像pull下来默认是最新版的CUDA1...

2019-12-13 10:44:16 1836

原创 1107 Social Clusters (30 分)(并查集)

1107 Social Clusters (30 分)When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A social cluster is a set of ...

2019-09-05 22:42:55 148

原创 1118 Birds in Forest (25 分)(并查集)

1118 Birds in Forest (25 分)Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the ...

2019-09-05 22:42:23 157

原创 并查集

理论考虑这样一道题,判断图中是否有环:我们该如何去做呢?利用并查集的方法,过程如下:0->1有边,所以0和1加入一个连通集合中:1->2有边,同样加入到连通集合中。接着检查3->4有边,3和4作为一个集合:1->3有边,把上面两个集合合并,形成0,1,2,3,4集合。(此时已经使用的边有(0,1), (1,2), (3,4), (1,3))此时并...

2019-09-05 22:30:37 108

原创 PAT甲级真题分类

主要考点:树:数的遍历、二叉搜索树图论:最短路径、DFS、BFS排序:快速排序、插入排序、归并排序、堆排序字符串:时间问题其他:多项式问题树树的遍历:1020、1086、1094、1119二叉搜索树:1043、1064图论最短路径:1003、1018、1030BFS: 1094、1127DFS: 1053、1079、1103、1130排序插入排序和归并排序...

2019-09-02 10:12:05 191

原创 堆排序图文介绍

堆的概念:堆是一颗完全二叉树满足父节点 > 子节点(大根堆)完全二叉树:除最后一层外,都是满二叉树,并且最后一层节点是从左到右依次添加。堆化调整:heapify的过程:出现父节点小于子节点时,从中找出最大值,个根节点进行交换。交换后如下:接着找刚刚交换的节点,再对4和5进行交换。整个过程如下:从h-1层开始:2. 对h-1层所有节点进行heapify,使...

2019-09-02 09:59:33 147

原创 归并排序图文介绍

把数组左边和右边拆成两个小的数组,然后用Merge函数合并:void merge(int arr[], int L, int M, int R){ int LEFT_SIZE = M-L; int RIGHT_SIZE = R - M + 1; int left[LEFT_SIZE]; int right[RIGHT_SIZE]; int i, j, ...

2019-09-02 09:55:18 212

原创 PAT——1130

1130 Infix Expression (25 分)Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.Input Specificat...

2019-08-31 20:54:01 176

原创 PAT——1103 Integer Factorization (30 分)

1103 Integer Factorization (30 分)The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P f...

2019-08-31 20:47:32 149

原创 PAT——1079 Total Sales of Supply Chain (25 分)

1079 Total Sales of Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting...

2019-08-31 20:46:56 128

原创 PAT——1053 Path of Equal Weight(30分)(DFS遍历树)

1053 Path of Equal Weight (30 分)Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum of the weights of all t...

2019-08-31 20:46:02 163

原创 PAT——1127 ZigZagging on a Tree (30 分)(BFS遍历树)

1127ZigZagging on a Tree(30分)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal s...

2019-08-30 20:50:10 167

原创 PAT——1094 The Largest Generation (25 分)(BFS遍历树)

1094The Largest Generation(25分)A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation ...

2019-08-30 20:48:23 155

原创 PAT——1064 Complete Binary Search Tree (30 分)(完全二叉搜索树)

1064Complete Binary Search Tree(30分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with key...

2019-08-30 20:45:16 227

原创 PAT——1043 Is It a Binary Search Tree (25 分)(插入法构建二叉搜索树)

1043Is It a Binary Search Tree(25分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...

2019-08-30 20:30:50 204

原创 PAT——1119 Pre- and Post-order Traversals (30 分)(给定先序和后序序列,判断能否构建一颗唯一的树)

1119Pre- and Post-order Traversals(30分)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder t...

2019-08-30 20:27:24 238

原创 PAT——1086 Tree Traversals Again (25 分)(先序+中序构建二叉树)

1086Tree Traversals Again(25分)An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered ...

2019-08-30 20:24:05 147

原创 PAT——1020 Tree Traversals (25 分)(后续+先序构建二叉树)

Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor...

2019-08-30 20:22:05 110

原创 PAT——1030 Travel Plan (30 分)

1030Travel Plan(30分)A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to d...

2019-08-30 20:17:54 184

原创 PAT——1018 Public Bike Management

1018Public Bike Management(30分)There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and ret...

2019-08-30 20:13:56 106

原创 PAT——1003 Emergency (25 分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...

2019-08-30 20:01:33 101

转载 Docker学习笔记

转载博客:https://blog.csdn.net/ct_1020/article/details/96434290

2019-07-23 10:24:19 94

原创 k8s集群配置搭建

有关K8S及其依赖的安装,见上一个博客:https://blog.csdn.net/a429367172/article/details/96426149前期准备建议以root登录。需要将节点的防火墙、SElinux和swap分区关闭。关闭防火墙:systemctl stop firewalld.service #关闭防火墙systemctl disable firewal...

2019-07-19 18:51:45 337

原创 CentOS64下kubernetes(k8s)的安装

最近在做有关amino的项目,项目需要先安装kubernetes,在此记录下安装过程。1.centos7集群环境的搭建之前已经搭建过桌面版的centos了,现在需要搭建另一台虚拟机,可以参考:https://blog.csdn.net/cndmss/article/details/80149952需要注意:用最小版安装时,可能默认不会装ifconfig,需要用 yum inst...

2019-07-19 11:34:25 212

原创 Win10+VS2017+CUDA8.0环境配置(VS打开darknet.sln报错,找不到项目CUDA 10.0.props)

关于CUDA的安装,参考https://blog.csdn.net/a429367172/article/details/88981472在上一篇博客中,并没有安装Visual Studio Integration,这篇文章用来单独安装。1.打开CUDA安装程序,记住提取路径,提取直到出现如下页面2.不要关闭,根据提取路径找到如下文件:3.将以上文件拷贝到提示目录Build...

2019-07-11 14:54:05 4817 6

原创 pyqt5笔记——截取QLabel图片四个顶点,做文档较正

要求利用QLabel控件显示图片; 鼠标点击,获取单机坐标,根据四个顶点坐标,在图中画出截取区域; 确定,根据鼠标点击的四个点,求取单适应矩阵,做图像较正。说明画图在QLabel画图,需要继承QLabel类,重写paintEvent和mouseReleaseEvent。需要注意的是,在mouseReleaseEvent中获取鼠标点击的点的时候,global_point =e...

2019-06-11 09:33:37 2981 1

转载 python笔记——线程的暂停,恢复,退出

我们可以自己实现python线程控制. 一般的方法就是循环地判断一个标志位, 一旦标志位到达到预定的值, 就退出循环. 这样就能做到退出线程了. 但暂停和恢复线程就有点难了, 我一直也不清除有什么好的方法, 直到我看到threading中Event对象的wait方法的描述时.笔记链接如下:https://www.cnblogs.com/scolia/p/6132950.htmlhttps:...

2019-06-09 11:12:52 5931

原创 pyqt5笔记——QLable显示cv2读取的图片

在做pyqt5编程的时候,需要用QLable显示图片,QLable可以直接显示QPixmap读取的图片,但是显示numpy模块读取的图片时,需要做如下转换: def load_image(self,resize_height, resize_width,normalization=False): ''' 读取图片数据,默认返回的是uint8,[0...

2019-06-08 11:53:28 8409 2

原创 pyqt5笔记——QListView和QListWidget的使用

今天在用QListView部件的时候,想和C++上Qt一样使用QListView的currentRowChanged信号,以及使用addItem()一个个添加部件,但是使用pyqt5的时候,发现QListView里面没有这两个函数。于是翻了博客,发现QListWidget里面有这些函数,所有果断选择用QListWiget。并且,还学到了一招,setModel(list),参数是python...

2019-06-08 00:15:56 5598

原创 Win10下安装CUDA和cuDNN

CUDA安装以CUDA8.0为例:进入NVIDIA官网下载CUDA安装包https://developer.nvidia.com/cuda-toolkit-archive找到你对应的版本,我的是8.0,选择如图:下载之后,打开,选择存临时文件的路径,确定。选择自定义版选择安装以上4项。不要选Visual Studio Integration,因为有可能出现全...

2019-04-03 17:47:35 2273 3

原创 win10下安装CUDA和CUDNN的版本对应

版本对应首先查看你的GPU支持的CUDA版本号:https://blog.csdn.net/Candy_GL/article/details/79435151 根据这个版本号,选择与CUDA对应的tensorflow、python、cuDNN版本号官网推荐的tensorflow、python、cuDNN、CUDA对应版本,这里是官网版本链接https://www.tensorflow.or...

2019-04-02 21:11:14 3922

原创 MPI编程——分块矩阵乘法(cannon算法)

要求:分析本题难点在于不同process之间的通信,算法主要利用了cannon算法,cannon算法描述如下:以上算法主要分为两个过程:分配初始位置、进行乘-加运算、循环单步移位。为了方便,下面以p = 9时的3*3矩阵为例:初始化根据以上描述,A向左循环移动i位,做如图操作:A(0,0) A(0,1) A(0,2) A(1...

2019-03-31 20:45:58 5119 2

原创 MPI编程——计算工资排名

要求用若干进程模拟若干员工,编写程序将其工资多少排序,要求非根进程不能得知所有员工的工资,但是需要知道自己的工资排在多少位。代码:#include <stdio.h>#include <stdlib.h>#include "mpi.h"#include<malloc.h>#include<stdlib.h>typedef ...

2019-03-31 11:11:10 204

原创 蓝桥杯历届真题 剪格子

问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,每个部分的数字和都是60。本题的要求就是请你编程判定:对给定的m x n 的格子中的整数,是否可以分割为两个部分,使得这两个区域的数字和...

2019-03-21 20:29:10 195

MPI编程——分块矩阵乘法

分块矩阵乘法,利用cannon算法进行实现。运行环境:Centos7、mpic++3.2.0 分析见 MPI编程——分块矩阵乘法的博客

2019-03-31

空空如也

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

TA关注的人

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