/images/avatar.png

Xiaopeng Xu, Ph.D.

Research Scientist @ KAUST · Agentic AI for scientific discovery, protein design & synthetic biology

Recent News

Recent Notes

数据库常用命令

MySQL 使用

安装 MySQL

sudo apt install mysql-server  # install
sudo systemctl start mysql.service  # start

修改 root 密码

sudo mysql # start mysql with root user

Change root password in mysql, set root password as: Xp@KAUST2023

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Xp@KAUST2023';
exit;

Go back to using the default authentication method

Nanopore 信号分析

原始测序电信号数据格式

FAST5 数据格式

https://github.com/nanoporetech/fast5_research

https://blog.csdn.net/Emmett_Bioinfo/article/details/113847543

https://zhuanlan.zhihu.com/p/137069950

FAST5格式(.fast5)实际上是在HDF5格式上的一种变体。HDF是Hierarchical Data Format的首字母缩写,从名字上就可以看出来这种文件格式储存信息的方式是层级嵌套的(hierarchical, nested)。它采用chunking(分解)的方式来存储多维数据,它内部表现出来的是类似于文件夹(树)的结构。由于这种文件层级分解的特性,想要获取某一部分信息,只需要获得该部分信息所在的chunk即可,这样就让这种文件格式非常的flexible,也非常适合用于多种编程语言来处理。FAST5格式是Oxford推出Nanopore测序之后在HDF5格式的基础上设计用于存储Nanopore测序信息的文件。

深度学习在图上的应用

Zhang Z , Cui P , Zhu W . Deep Learning on Graphs: A Survey[J]. 2018. 深度学习在大量领域表现出明显的效果,无论是语音,图像,还是自然语言处理。但是由于图结构数据具有独特的属性,深度学习并不是自然的适用。最近,在这个方向进行了大量的研究极大地促进了图分析技术。调研了可以应用于图的不同种类深度学习方法,主要分为三大类:半监督学习,包括图神经网络和图卷积神经网络;无监督学习图自编码机;最新的进展,图循环神经网络和图强化学习。分析了不同方法的特点和联系。

转化基金申请写作

本文档是针对KAUST 转化基金写作任务而撰写的文档。将自己所学习了解到的信息整理合并,以备后续再遇到类似情况。

提案征集说明 Call for proposal

  • First round (TRG2024)

  • 资助目标是项目从 2-3 级的技术完整性水平到达4级及以上的完整性水平。

PyTorch 常用命令

Tensor 操作

文档:https://pytorch.org/docs/stable/index.html

Tensor 相关属性

查看 device

example_tensor.device

查看 shape

example_tensor.shape
example_tensor.size(1)

查看元素个数

example_tensor.numel()

Tensor 元素索引

example_scalar = example_tensor[1, 1, 0]
example_scalar.item()
example_tensor[:, 0, 0]

Tensor 初始化

0, 1 或随机数

torch.ones_like(example_tensor)
torch.zeros_like(example_tensor)
torch.randn_like(example_tensor)
torch.randn(2, 2, device='cpu') # Alternatively, for a GPU tensor, you'd use device='cuda'
torch.arange(4 * 5 * 6).view(4, 5, 6) # shape [4,5,6]

torch.clone 复制 tensor

real_clone = real.clone()

F.one_hot 生成多分类 tensor

F.one_hot(labels % n_classes)

nn.init.* 填充 tensor

nn.init.xavier_uniform_(tensor) # fill with uniform distribution, values scaled by 'gain'
nn.init.constant_(bias, 0) # fill with constant
nn.init.orthogonal_(param) # with a (semi) orthogonal matrix

基础函数

逐元素加减乘 mul, *

(example_tensor - 5) * 2 # 顺序有影响
torch.mul(tensor_x, tensor_x) # 逐元素积
tensor_x * tensor_y # 逐元素积 = torch.mul(x, y)

Tensor 乘法 matmul, @, bmm, dot

https://blog.csdn.net/foneone/article/details/103876519