2020年4月6日

一、Josephu约瑟夫问题

摘要: Description约瑟夫问题:有n个人,按顺时针方向围成一圈(编号从1到n),从第1号开始报数,一直数到m,数到m的人退出圈外,剩下的人再接着从1开始报数。,编程求输入n,m后,输出出圈的序号。Input每行是用空格分开的两个整数,第一个是 n, 第二个是 m ( 0 < m,n <=300)。 阅读全文

posted @ 2020-04-06 12:53 feihu_h 阅读(198) 评论(0) 推荐(0) 编辑

2020年3月29日

如何写README.md

摘要: 扩展名称为.md 参考:https://www.jianshu.com/p/1762b998bb78 https://blog.csdn.net/u011001084/article/details/52803778 https://www.jianshu.com/p/191d1e21f7ed/ 阅读全文

posted @ 2020-03-29 23:28 feihu_h 阅读(239) 评论(0) 推荐(0) 编辑

(2020-03-29)--------paper list

摘要: 1、Title: Learning Layout and Style Reconfigurable GANs for Controllable Image 可控图像学习布局与风格可重构GANs 1 标题:可控图像学习布局与风格可重构GANs 2 3 合成 4 5 作者:魏孙、吴天福 6 7 类别:c 阅读全文

posted @ 2020-03-29 01:02 feihu_h 阅读(335) 评论(0) 推荐(0) 编辑

2020年3月9日

ROS(八)----示例

摘要: 一、代码 PassWord.srv int32 password bool result book_class.h #include "ros/ros.h" #include "std_msgs/String.h" #include "std_msgs/Float64.h" #include "st 阅读全文

posted @ 2020-03-09 17:07 feihu_h 阅读(389) 评论(0) 推荐(0) 编辑

2020年3月5日

ROS(七)----动态参数

摘要: 一、工程结构 二、创建并编译 cfg #!/usr/bin/env python PACKAGE = "book_dynamic_param" from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGe 阅读全文

posted @ 2020-03-05 18:14 feihu_h 阅读(411) 评论(0) 推荐(0) 编辑

ROS(六)----参数

摘要: 一、基本方法 ROS 获取参数的方式: ros::param::get() ros::NodeHandle::getParam() ros::NodeHandle::param() ROS 设置参数的方式: ros::param::set() ros::NodeHandle::setParam() 阅读全文

posted @ 2020-03-05 14:48 feihu_h 阅读(453) 评论(0) 推荐(0) 编辑

ROS(四)---自定义消息.msg

摘要: 一、工程结构 新的ros package book 二、定义 msg 编译后,在工作空间下的devel 中include 有头文件 book/Student.h 发布端 #include "ros/ros.h" #include "book/Student.h" #include <cstdlib> 阅读全文

posted @ 2020-03-05 01:49 feihu_h 阅读(658) 评论(0) 推荐(0) 编辑

2020年3月4日

ROS(三)-----节点的定义

摘要: 一、一个工程结构 CATKIN_WS 目录为工作区 src 下面包含不同的包 package 二、节点定义 发布节点 #include"ros/ros.h" #include "std_msgs/String.h" int main(int argc,char **argv) { // initia 阅读全文

posted @ 2020-03-04 00:44 feihu_h 阅读(868) 评论(0) 推荐(0) 编辑

ROS(二)-------RoboWare Studio

摘要: 下载地址:https://github.com/TonyRobotics/RoboWare/tree/master/Studio1、创建工作区 2、创建ROS包 src右键新建ros包 在ros包上右键可以新建ros包下的src文件夹 右键ROS包下的src选择"新建CPP源文件" 输入文件名后,按 阅读全文

posted @ 2020-03-04 00:34 feihu_h 阅读(319) 评论(0) 推荐(0) 编辑

2020年3月3日

ROS(一)-----ros 安装

摘要: 一、 资料地址 ROS: https://www.ros.org/ ROS: kinetic 版本的安装参考 http://wiki.ros.org/kinetic/Installation/Ubuntu 需要ubuntu16.04 二、ubuntu 系统的基本使用命令 ls : 列出当前目录的所有 阅读全文

posted @ 2020-03-03 21:10 feihu_h 阅读(348) 评论(0) 推荐(0) 编辑

2020年2月14日

pytorch(4)----nn.Module、nn.functional、nn.Sequential、nn.optim

摘要: 基本内容 1、 实现一个网络模型,需要继承torch.nn.Module类,初始化模型参数,并实现forward()函数 2、torch.nn.functional 提供一些如损失函数等不需要学习参数的功能函数 3、torch.nn.Sequential() 模块简化简单模型的定义 4、损失函数to 阅读全文

posted @ 2020-02-14 13:51 feihu_h 阅读(453) 评论(0) 推荐(0) 编辑

2020年2月13日

pytorch(3)----基本类型Autograd计算图

摘要: pytorch 0.4版本之后,torch.autograd.Variable 和torch.Tensor 进行了整合。 基本内容 1、 创建可以自动求导的Tensor,默认为false。requires_grad属性 2、 Tensor 的连个属性: grad: 记录该Tensor对应的梯度 gr 阅读全文

posted @ 2020-02-13 22:40 feihu_h 阅读(309) 评论(0) 推荐(0) 编辑

pytorch(2)----基本数据类型与模块

摘要: Tensor 张量,包含单一数据类型元素的矩阵。 基本内容 1、数据初始化及数据类型转换 2、组合: torch.cat() 按照某一个维度进行拼接,总维度数目不变 torch.stack() 按照制定维度进行叠加,新增维度 3、分块:torch.chunk() 指定分块数量 torch.split 阅读全文

posted @ 2020-02-13 19:09 feihu_h 阅读(389) 评论(0) 推荐(0) 编辑

2020年2月12日

pytorch(1)-----环境安装

摘要: 1、anconda 1.1 下载合适的版本,安装后。 在终端输入:sudo gedit ~/.bashrc 添加: export PATH=~/anaconda3/bin:$PATH 在终端输入: source ~/.bashrc 1.2 anconda 更换下载源 conda config --a 阅读全文

posted @ 2020-02-12 23:24 feihu_h 阅读(239) 评论(0) 推荐(0) 编辑

2020年1月28日

c++(4)----指针和引用、const

摘要: 指针和引用都是一种复合类型。 复合类型: 基于其他类型定义的类型 基本数据类型+声明符 引用并非对象,而是一个别名,定义时必须初始化 // 引用并非对象,而是一个别名 int ival =1024; int &refVal = ival; // refVal 指向ival(是ival的另一个名称) 阅读全文

posted @ 2020-01-28 19:47 feihu_h 阅读(225) 评论(0) 推荐(0) 编辑

c++(3)----变量的声明和定义

摘要: 分离式编译(separate compilation): 允许将程序分割为若干个文件,每个文件可独立编译。 声明:使得名字为程序所知。 定义:负责创建与名字关联的实体。 变量只能被定义一次,但可以被声明多次。 如果要在多个文件中使用同一个变量,就必须将声明和定义分离。此时,变量的定义必须出现在且只能 阅读全文

posted @ 2020-01-28 13:19 feihu_h 阅读(305) 评论(0) 推荐(0) 编辑

C++(2)----智能指针与动态内存

摘要: C++ 11提供的智能指针有:shared_ptr、unique_ptr、weak_ptr。在 头文件 memory 中。 一、new delete 直接管理内存 1、初始化 string * ps = new string // 初始换为一个空string int * pi = new int ; 阅读全文

posted @ 2020-01-28 09:31 feihu_h 阅读(244) 评论(0) 推荐(0) 编辑

2020年1月17日

c++(1)----堆内存、栈内存

摘要: 一、在C++内存管理中: 动态分配内存的区域称之为堆内存。 new 和 delete 操作的区域是 free store(heap 的子集) malloc 和 free 操作的区域是 heap 函数调用过程中产生的本地变量和调用数据的区域称之为栈。 二、堆内存: 动态内存分配有一定的不确定性(分配时 阅读全文

posted @ 2020-01-17 13:54 feihu_h 阅读(331) 评论(0) 推荐(0) 编辑

2020年1月10日

OpenBLAS(2)----BLAS

摘要: OpenBLAS 是BLAS的高效开源实现。 BLAS(Basic Linear Algebra Subprograms) ,提供基本向量和矩阵运算。 level1: 标量、矢量和矢量运算 level2: 矩阵和矢量运算 level3: 矩阵和矩阵运算 Blas文档: http://www.netl 阅读全文

posted @ 2020-01-10 17:46 feihu_h 阅读(365) 评论(0) 推荐(0) 编辑

openmp(1)----计时

摘要: 时间是用来评价一个算法或代码的重要指标。 clock_t 为时钟周期数,在并行程序中这种方式不能测量时间。 #include <time.h> clock_t start,finish; start = clock(); finish = clock(); std::cout<<"完成需要 "<<f 阅读全文

posted @ 2020-01-10 10:14 feihu_h 阅读(1573) 评论(0) 推荐(0) 编辑

导航