摘要: C++模板:函数、结构体、类 模板实现 1.前言:(知道有模板这回事的童鞋请忽视) 普通函数、函数重载、模板函数 认识。 2.函数、结构体、类 模板的 定义样例: 其中,template是定义模板函数的关键字;template后面的尖括号不能省略;class(或typename)是声明数据类型参数标 阅读全文
posted @ 2017-03-22 22:53 Wei_Xiong 阅读(27892) 评论(9) 推荐(2) 编辑
摘要: 原文:https://www.cnblogs.com/Twobox/p/16836104.html 背景动机 大多数搜索算法专注于在搜索空间中寻找一个或一小组高质量的解决方案。用户指定了解决方案应该追求的一个或几个目标。例如,用户可能需要高性能和低成本的解决方案。传统的搜索算法包括爬山、模拟退火、进 阅读全文
posted @ 2022-10-28 14:56 Wei_Xiong 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 原文:https://www.cnblogs.com/Twobox/p/16791412.html 熵 熵:表述一个概率分布的不确定性。例如一个不倒翁和一个魔方抛到地上,看他们平稳后状态。很明显,魔方可能有6种状态,而不倒翁很大可能就一个状态,那么我们说在这种情况下,不倒翁的确定性高于魔方。也就是魔 阅读全文
posted @ 2022-10-14 13:55 Wei_Xiong 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 错误: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [100, 1]], w 阅读全文
posted @ 2022-09-27 21:16 Wei_Xiong 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 改进 Gt = Gt - mean(Gt) 代码 model.py import torch import torch.nn as nn import torch.nn.functional as F class Model(nn.Module): def __init__(self): super 阅读全文
posted @ 2022-09-14 10:35 Wei_Xiong 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 策略梯度,入门样例 原文链接: https://www.cnblogs.com/Twobox/ 参考链接: https://datawhalechina.github.io/easy-rl/#/chapter4/chapter4 https://zhuanlan.zhihu.com/p/358700 阅读全文
posted @ 2022-09-13 15:53 Wei_Xiong 阅读(84) 评论(0) 推荐(0) 编辑
摘要: MOEAD原理及Python实现,MOEAD,切比雪夫方法实现,python语言 阅读全文
posted @ 2022-06-27 19:48 Wei_Xiong 阅读(2393) 评论(3) 推荐(2) 编辑
摘要: 算法流程: P:父辈种群Q:子辈种群R:P并上Q -》 之后依据偏序关系进行排序在实际上,能在原来数组上改就到原来数组上改,要产生新的那就产生新的,分配一次内存时间应该影响不大,以后再考虑底层优化。!在函数调用上,一律认为创建了一个新的数组初始化:P计算P适应度:F根据适应度度计算层次关系:rank 阅读全文
posted @ 2022-06-27 16:07 Wei_Xiong 阅读(2192) 评论(0) 推荐(0) 编辑
摘要: 1 import numpy as np 2 3 4 def compare(p1, p2): 5 # return 0同层 1 p1支配p2 6 # 每个维度越小越优秀 7 # 计D次 8 D = len(p1) 9 p1_dominate_p2 = True # p1 更小 10 p2_domi 阅读全文
posted @ 2022-06-24 14:47 Wei_Xiong 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 基于分解的多目标问题中均匀权重向量集合的生成,pyhton,问题转换,递归。 阅读全文
posted @ 2022-06-24 14:26 Wei_Xiong 阅读(899) 评论(0) 推荐(0) 编辑
摘要: 1 import numpy as np 2 3 4 def quicksort(arr, low, high): # [a,b] 5 if low < high: 6 m = partition(arr, low, high) 7 quicksort(arr, low, m - 1) 8 quic 阅读全文
posted @ 2022-06-22 09:48 Wei_Xiong 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 方法一:使用WinSW工具 工具地址:https://link.jianshu.com/?t=https://github.com/kohsuke/winsw/releases 参考:https://blog.csdn.net/wgd930701/article/details/123640481 阅读全文
posted @ 2022-06-05 23:32 Wei_Xiong 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1 @echo off 2 echo %time% 3 ping -n 5 127.0.0.1>nul 4 echo %time% 5 pause 上面实现延时5-1=4秒 参考:http://t.zoukankan.com/chenjy1225-p-13188623.html 阅读全文
posted @ 2022-06-05 23:22 Wei_Xiong 阅读(1156) 评论(0) 推荐(0) 编辑
摘要: javaw.exe主要用于启动基于GUI的应用程序。java.exe执行应用日志再在控制台显示输出与错误信息。 阅读全文
posted @ 2022-06-05 16:15 Wei_Xiong 阅读(174) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/hhhhh11123/article/details/120174276 阅读全文
posted @ 2022-06-05 15:03 Wei_Xiong 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1 创建阿里云AccessKey,作为访问密钥 进入后点击“创建AccessKey”。创建成功后记住,AccessKeyId和AccessKeySecret 2 获取域名解析某条码id 进入阿里云域名解析界面 F12打开开发工具,点击网络,再点击垃圾桶,清空原来列表内容 在你要ddns的条目上,点击 阅读全文
posted @ 2022-06-04 22:53 Wei_Xiong 阅读(644) 评论(0) 推荐(0) 编辑
WX:我是来搞笑的