debug
weixin_47560863
这个作者很懒,什么都没留下…
展开
-
unitree_ros
build the package原创 2022-09-11 11:17:04 · 810 阅读 · 0 评论 -
matplotlib 画分割子图
matplotlib 画分割子图subplot 分割不对称不对称子图原创 2022-05-13 11:26:08 · 381 阅读 · 0 评论 -
安装mujoco210
安装MuJoCo210 安装MuJoCo MuJoCo dm_control ubuntu原创 2022-05-08 17:06:02 · 519 阅读 · 0 评论 -
np.take_along_axis 多维数组的索引
代码a = np.arange(2*3*4)a = d.reshape([2,3,4])b = np.zeros([2,3,1]).astype('int)c = np.take_along_axis(a,b,-1)结果a.shape = (2, 3, 4)b.shape = (2, 3, 1)c,shape = (2, 3, 1)a = array([[ [ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10,原创 2022-04-08 17:27:19 · 1016 阅读 · 0 评论 -
linx make install
cmake, makefile.txt, make关系简介makefile.txt 架构cmake 简单示例原创 2022-03-25 01:31:00 · 709 阅读 · 0 评论 -
配置smac环境
StarCraftII 4.10unzip SC2.4.10.zip # password is iagreetotheeuladownload SMAC Maps, and move it to ~/StarCraftII/Maps/.To use a stableid, copy stableid.json from https://github.com/Blizzard/s2client-proto.git to ~/StarCraftII/.echo $SHELLvim原创 2022-03-11 17:04:50 · 495 阅读 · 0 评论 -
env.render()报错
执行env.render()时报错pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to “None”将运行指令改为xvfb-run -s "-screen 0 1400x900x24" xxx.py原创 2022-02-28 17:31:50 · 1035 阅读 · 0 评论 -
Latex trick
Overleaf 中文编辑正常情况下overleaf中输入中文按recompile无法显示,解决方法如下:点击menu->Setting//Compiler 选择 XeLaTex添加代码\usepackage{ctex}title觉得title太占地方,可添加代码\title{Alphafold2\vspace{-2cm}}\author{}\date{}其中{}代表醭显示响应内容,\vspace{-2cm}代表压缩标题到第一行的间距...原创 2022-02-27 13:14:27 · 221 阅读 · 0 评论 -
gym wrapper
import gymclass myWrapper(gym.Wrapper): def __init__(self, env): gym.Wrapper.__init__(self, env) def reset(self, addition=None, **kwargs): obs_n = self.env.reset(**kwargs) return obs_n def step(self, actions):原创 2022-02-25 11:54:54 · 266 阅读 · 0 评论 -
创建虚拟环境
# 安装pip install virtualenv# 创建名为test的虚拟环境virtualenv testpython3 -m test# 激活环境source test/bin/activate# 退出虚拟环境deactivate原创 2022-02-25 10:36:51 · 726 阅读 · 0 评论 -
cv2射影变换
效果图变换前变换后代码import cv2import numpy as npimg = cv2.imread('img.jpg')h,w,c = img.shape # 480, 640, 3# 依序是左上、右上、右下、左下 (顺序不重要)before = np.array([[110,240],[532,240],[637,464],[3,464]], dtype='float32')after = np.array([[0,0],[w-1,0],[w-1,h-1],[原创 2022-02-23 14:19:14 · 2172 阅读 · 0 评论 -
打印模型参数
打印模型参数总数打印模型第一层bias的第一个参数内容nn modulenamed_parametersnumel原创 2022-02-22 22:35:05 · 535 阅读 · 0 评论