- 博客(406)
- 资源 (16)
- 收藏
- 关注
原创 python读取csv文件指定行
if index == 6+k*11 or index == 7+k*11 or index == 8+k*11 or index == 9+k*11 or index == 10+k*11:#目标行。results=np.array(results).astype(float)#直接读取的数据是str 转float。elif index % 11 == 10: # 最后一折。if index%11==6:#第一折。# 这是表示读取前10行。
2022-10-18 18:03:53 7547
原创 failed to allocate 2.00G (2147483648 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
显存充足,但是却出现CUDA error:out of memory错误添加:import os# 设置程序使用的GPU编号:我用6号和7号显卡os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'import numpy as npimport kerasimport keras.backend as Kimport tensorflow.compat.v1 as tftf.disable_v2_behavior()import keras.b
2022-03-01 20:59:49 4758 2
原创 Could not load library cudnn_cnn_infer64_8.dll. Error code 126
Could not load library cudnn_cnn_infer64_8.dll. Error code 126Please make sure cudnn_cnn_infer64_8.dll is in your library path!C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\lib下有对应文件,但是依旧报错。解决:cudnn版本从8.3改为8.2Index of /anaconda/pkgs/main/
2022-01-22 19:55:51 1719
原创 NIFTI matlab下载使用
官网下载及函数说明:Tools for NIfTI and ANALYZE image - File Exchange - MATLAB Central (mathworks.cn)https://ww2.mathworks.cn/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image配置:可将解压文件放至matlab toolbox文件夹下...
2022-01-15 16:24:03 2386
原创 freesurfer+matrix3+fsl安装配置
Ubuntu虚拟机## 安装freesurfer参考:https://blog.csdn.net/uinglin/article/details/79541063Linux平台安装官方教程:https://surfer.nmr.mgh.harvard.edu/fswiki//FS7_linuxPS:在获取license时我翻墙才获得,不翻墙在提交时注册不了,因为刷不出来“I am not a robot"的验证图片。将下载的license.txt 放到freesurfer文件夹中。在~/.
2022-01-11 21:40:57 912
原创 python 实现LDA二分类
import torchfrom getData import loadFeatur,loadFeatureByCorrNum,loadFeatureByNormfrom torch_geometric.data import DataLoaderfrom GCNmodel import GCN,GNN,createGNNdatasetimport numpy as npimport randomprint("\n---------Starting to load Data---------.
2022-01-11 20:45:43 793
原创 iPad+zoteto+WPS实现文件同步
开始是用坚果云+papership,但是papership编辑文件要钱。wps一定程度上免费够用。zotero:1.2.3. 选中要在pad中看的文件,右键wps:同步文件夹zotero_file也可以在我的云服务里进行添加
2022-01-11 19:48:01 4006 2
原创 Python读取csv文件列数据,并去除其中的nan行
import numpy as npimport pandas as pd#读取csv文件列数据,并去除其中的nan行def getSubjID(subjBehavFile='D:/HCP documents/HCP1200_behavior.csv'): # 使用pandas读入 behavData = pd.read_csv(subjBehavFile) #读取文件中所有数据 # 按列分离数据 allSubjID = behavData[['Subject']]#读
2021-12-26 11:30:15 3359
原创 C++实现卷积运算
清理磁盘,看到了几年前的代码#include<iostream>using namespace std;void main(){ //输入卷积矩阵 int row1 = 3, col1 = 3; int a[3][3]; //cout<<"输入卷积矩阵的行数:"; //cin>>row1; //cout<<"输入卷积矩阵的列数:"; //cin>>col1; cout << "输入卷积矩阵:" <<
2021-12-25 14:02:35 4378 1
原创 Freesurfer matlab使用
官方有一个相关说明,https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime我没有用这个。matlab我习惯在windows用,我直接将freesurfer/matlab/和freesurfer/fsfast/toolbox/两文件夹添加到matlab路径。、
2021-12-20 17:26:06 1105
原创 PyG (PyTorch Geometric) GNN 笔记
https://pytorch-geometric.readthedocs.io/en/latest/index.htmlINTRODUCTION BY EXAMPLEhttps://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.htmlA graph is used to model pairwise relations (edges) between objects (nodes). A single graph in
2021-12-15 20:26:45 3479
原创 AttributeError: module ‘keras.optimizers‘ has no attribute ‘Adam‘
问题AttributeError: module ‘keras.optimizers’ has no attribute ‘Adam’解决:optimizers.Adam(lr=lr)改为tf.keras.optimizers.Adam(lr=lr)
2021-12-14 20:07:17 11524
原创 问题:Got an unexpected keyword argument ‘keep_dims‘
TimeDistributed(Lambda(lambda x: tf.reduce_max(x, axis=-2, keepdims=True)))(net)报错:reduce_max() Got an unexpected keyword argument ‘keep_dims’解决:查看函数实现,keep_dims 改为 keepdimsAttributeError: module ‘keras.optimizers’ has no attribute ‘Adam’optimizers.Ad
2021-12-14 20:03:09 3793
原创 model.fit()错误:ValueError: Layer “model“ expects 2 input(s), but it received 1 input tensors.
model.fit()错误:ValueError: Layer “model” expects 2 input(s), but it received 1 input tensors. Inputs received: [<tf.Tensor ‘IteratorGetNext:0’ shape=(8, 100, 236, 1) dtype=float32>]#beforemodel.fit([x_train, y_train], [y_train, x_train], batch_size
2021-12-09 16:41:43 5001 1
原创 MATLAB GIfTI library
运行matlab程序时,出现错误:函数或变量 ‘gifti’ 无法识别。https://www.artefact.tk/software/matlab/gifti/下载源码:https://github.com/gllmflndn/gifti将gifti文件夹加入到matlab程序路径。This library is also part of SPM.ExampleIn the following, we use the files contained in BV_GIFTI.tar.gz (B
2021-12-08 13:02:12 1226
原创 Freesurfer tutorial主要内容
Introduction to Freesurfer Outputhttps://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/OutputData_freeviewhttps://blog.csdn.net/qq_28480795/article/details/105094883本教程旨在介绍Freeview。有关此处未介绍的按钮或菜单选项的信息,您可以在FreeviewGuide wiki上找到。主要内容:如何可视化和检查FreeSurfer数据
2021-12-04 19:05:55 4543 1
原创 ModuleNotFoundError: No module named ‘torch_sparse‘
https://github.com/rusty1s/pytorch_sparseYou can now install pytorch-sparse via Anaconda for all major OS/PyTorch/CUDA combinations ???? Given that you have pytorch >= 1.8.0 installed, simply runconda install pytorch-sparse -c pyg
2021-12-02 17:34:20 1726
原创 R语言入门
https://www.r-bloggers.com/package的网站:https://rdrr.io/Rstudio的使用入门:https://zhuanlan.zhihu.com/p/45503712安装package:CRAN资源: 在R Console输入 install.packages("packagem 名称“)Bioconductor 资源:BiocManager::install(“xxxxx”)github资源:library(devtools)install_gi
2021-11-24 11:13:25 190
原创 联想拯救者R9000K间歇断网
电脑连接家里的wifi间歇断网,并且网速很慢。连接手机热点,会正常。联想的客服,不同的人会有不同的回答。真是不靠谱。有让重新装机的,也有说是路由器的问题,醉了,一个wifi,其他电脑都是好的。新机各种问题,耽误时间。有点火大。如果不是过了退货期,我就退了。不会再买联想了。我觉得更新电脑应该是能解决问题的。奈何网总断啊。直接在设备管理器里更新无线网卡区动没有用,提示已经是最新的驱动了。最后是直接下的驱动,运行更新就好了,也是神奇。https://newsupport.lenovo.com.c
2021-11-21 15:02:47 5330 1
原创 Virtualbox+ubuntu安装配置
安装Virtualbox+ubuntu,参考:https://blog.csdn.net/super828/article/details/117138727安装freesurfer参考:https://blog.csdn.net/uinglin/article/details/79541063PS:在获取license时我翻墙才获得,不翻墙在提交时注册不了,因为刷不出来“I am not a robot"的验证图片。https://blog.csdn.net/yoyoxueli123/artic
2021-11-12 21:32:13 1263
原创 python对称矩阵下三角转数组表示
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar
2021-11-03 16:13:00 254
原创 HCP数据集下载
下载地址(需要先注册):https://db.humanconnectome.org/app/template/Index.vm点击open datasets:documents 如下,reference manual 很重要(也可以在上图中下载manual),里面有详细的相关介绍,包括如何下载数据:https://humanconnectome.org/study/hcp-young-adult/document/1200-subjects-data-release/选择explore s
2021-10-13 10:36:37 4488 4
原创 spm12安装与使用
官网:https://www.fil.ion.ucl.ac.uk/spm/下载:https://www.fil.ion.ucl.ac.uk/spm/software/download/安装说明:https://en.wikibooks.org/wiki/SPM#Installationwindows安装说明:https://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Windows案例:https://www.fil.ion.ucl.ac
2021-10-08 21:48:16 3929
原创 MRtrix3安装
https://www.mrtrix.org/download/Windows 下载安装:https://www.msys2.org/
2021-10-08 21:41:09 1323
原创 matlab三维.mat文件转多个.txt
Gifted=cell2mat(struct2cell(load(‘308-308-15.mat’)));for i=1:15filename=[‘D:\brainNetworks\GCN\G’,num2str(i),’.txt’];a=Gifted(:,:,i);dlmwrite(filename,a,‘delimiter’,’\t’,‘newline’,‘pc’);end
2021-09-28 21:16:52 236
原创 Exception: Unexpected data type <class ‘numpy.bytes_‘>
booksheet.write(j,i,col) 报错Exception: Unexpected data type <class ‘numpy.bytes_’>改为:booksheet.write(j,i,str(col))
2021-09-27 10:52:54 748
原创 tensorflow版本问题 AttributeError: module ‘tensorflow‘ has no attribute ‘global_variables_initializer‘
import tensorflow as tf改为:import tensorflow.compat.v1 as tftf.disable_v2_behavior()
2021-09-27 10:51:29 403
原创 docopt.DocoptLanguageError: “usage:“ (case-insensitive) not found.
arguments = docopt(doc) 报错:docopt.DocoptLanguageError: “usage:” (case-insensitive) not found.在“”"“”"直接添加Usage:,Options:等说明。例:“”"Using multilayer perceptron (MLP) and ensemble learning to classify the ASD and TC based on single brain atlas.Usage:n
2021-09-27 10:29:28 373
原创 UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb5 in position 2: invalid start byte
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb5 in position 2: invalid start byte解决:将pheno = pd.read_csv(pheno_path)改为pheno = pd.read_csv(pheno_path,encoding=‘ANSI’)
2021-09-16 17:12:23 1908
原创 ml-agents在导出的unity环境部署训练模型onnx
import onnximport mlagentsimport onnxruntime as ortimport numpy as npimport timeimport torchimport mathimport gymimport tensorflow as tffrom gym_unity.envs import UnityToGymWrapperfrom mlagents_envs.environment import UnityEnvironmentfrom mlagen
2021-09-14 11:45:23 849
原创 File “h5py\h5f.pyx“, line 83, in h5py.h5f.open TypeError: expected bytes, str found
问题:File “h5py_objects.pyx”, line 54, in h5py._objects.with_phil.wrapperFile “h5py_objects.pyx”, line 55, in h5py._objects.with_phil.wrapperFile “h5py\h5f.pyx”, line 83, in h5py.h5f.openTypeError: expected bytes, str found解决:将h5py.h5f.open(filename, f
2021-09-14 11:08:16 1583 1
原创 onnx安装与使用
官网:https://github.com/onnx/onnxpip install onnx读取.onnx文件:import onnxmodel = onnx.load(r’C:\Users\Win10\Desktop\Pyramids.onnx’ )print(model)
2021-07-05 11:05:11 26461
原创 win10配置alphaction
环境:win10,vs2019, anaconda,https://github.com/MVIG-SJTU/AlphAction/blob/master/INSTALL.md打开Anaconda Prompt,输入命令conda create -n alphaction python=3.7conda activate alphaction# install pytorch with the same cuda version as in your environment.
2021-07-01 14:36:52 347 12
原创 OpenCV读取视频图像并保存
#include <iostream>#include <opencv2/opencv.hpp>using namespace std;using namespace cv;void main(){ VideoCapture cap; cap.open("C:/Users/Win10/Downloads/live2.avi"); //打开视频,以上两句等价于VideoCapture cap("E ://2.avi"); //cap.open("http://ww.
2021-05-31 14:56:24 230 4
原创 ml-agents 训练
GitHub - Unity-Technologies/ml-agents: Unity Machine Learning Agents ToolkitTrain:在anaconda prompt中(需要pytorch环境)cd D:\ml-agents-release_16mlagents-learn .\config\ppo\3DBall.yaml --run-id=ball如果是上次训练中断了,mlagents-learn config/ppo/3DBall.yaml ..
2021-05-26 16:12:18 308
原创 OpenCV同时打开3个摄像头并保存为视频
#include <opencv2/opencv.hpp>#include<iostream>using namespace cv;using namespace std;int main(){ //initialize and allocate memory to load the video stream from camera VideoCapture camera1(1 + cv::CAP_DSHOW); /*camera1.set(CAP_PROP_.
2021-05-11 10:47:08 755 6
原创 c++实现vector和shared pointer
c++实现vector和shared pointer,需要具备基本的default constructor, constructor, copy constructor, move constructor, assignment operator, move assignment operator, destructor。并进行测试。myVector.h:#pragma once#ifndef VECTOR_H#define VECTOR_H#include<iostream>
2021-04-23 15:03:02 342
probabilistic_robotics-master.zip
2020-12-04
OpenCV2计算机视觉英文版书及代码
2015-12-10
ROS机器人程序设计(二版) 英文
2015-11-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人