Diffusion model principle + DDPM case code analysis

Diffusion model principle + code analysis 1. Mathematical basis 1.1 General conditional probability form 1.2 Markov chain conditional probability form 1.3 Prior probability and posterior probability 1.4 Reparameterization techniques 1.5 KL divergence formula 2. The overall logic of the diffusion model (taking DDPM as an example) 2.1 Diffusion diffusion process (Forward noise addition process) 2.2 […]

[Source code analysis] SpringBoot integrates source code analysis of MybatisPlus framework

MybatisPlusAutoConfiguration Introduce mybatis-plus-boot-starter, there is spring.factories under the package, the content is as follows: # Auto Configure org.springframework.boot.env.EnvironmentPostProcessor=\ com.baomidou.mybatisplus.autoconfigure.SafetyEncryptProcessor org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ com.baomidou.mybatisplus.autoconfigure.IdentifierGeneratorAutoConfiguration,\ com.baomidou.mybatisplus.autoconfigure.MybatisPlusLanguageDriverAutoConfiguration,\ com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration MybatisPlusAutoConfigurationThis class injects components such as SqlSessionFactory and SqlSessionTemplate. SqlSessionFactory MybatisPlusAutoConfiguration#sqlSessionFactory, create SqlSessionFactory. @Bean @ConditionalOnMissingBean public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {<!– –> MybatisSqlSessionFactoryBean factory = new MybatisSqlSessionFactoryBean(); factory.setDataSource(dataSource); //… return factory. […]

Super detailed analysis of Spring’s @Conditional annotation

Foreword The known @Conditional annotation is used to specify conditions that can be registered as a bean in the container. Then this article will combine the sample project, start from the source code, and analyze the following aspects of the @Conditional annotation. The timing of the @Conditional annotation; The execution order of Condition; The relationship […]

Java source code analysis Lecture 17: What are the optimization schemes for MySQL?

Performance optimization (Optimize) refers to a method that can respond to requests more quickly under the premise of ensuring the correctness of the system. Moreover, some performance problems, such as slow queries, etc., if accumulated to a certain extent or encounter a rapid increase in concurrent requests, will lead to serious consequences, ranging from busy […]

ReentrantLock source code analysis

Foreword Note: The source code of this article comes from JDK11 ReentrantLock is a reentrant lock in Java, which can be used to replace the traditional synchronized keyword for thread synchronization. Here are some comparisons with the synchronized keyword: name implementation reentrancy interruption fairness Does it support timeout Release lock ReentrantLock Java API level , […]

Lab3: VS Code-based Linux kernel debugging environment construction and start_kernel tracking analysis

Article directory Compile the kernel make root file Use gdb to debug Configure vscode debugging reference article Compile the kernel Install development tools sudo apt install build-essential sudo apt install qemu # install QEMU# as a virtual machine sudo apt install libncurses5-dev bison flex libssl-dev libelf-dev Decompress the source code: tar -xvf linux-5.4.34.tar Configure the […]

VS Code-based Linux kernel debugging environment construction and start_kernel tracking analysis

1. Configure VSCode In order to prevent the problem of slow downloading through the virtual machine, choose to download the vscode installation package and upload the virtual machine through finalshell. Execute the following installation command to install sudo apt install ./code_1.76.2-1678817801_amd64.deb Also install the VSCode plugins C/C++ Intellisense and C/C++ Themes. Since the plug-in C/C++ […]

VSCode-based Linux kernel debugging environment construction and start_kernel tracking analysis

1. Install development tools The first step is to install the corresponding development tools on the Linux virtual machine, use the following command sudo apt install build-essential sudo apt install qemu # install QEMU# as a virtual machine sudo apt install libncurses5-dev bison flex libssl-dev libelf-dev #Dependencies required to compile the kernel — some basic […]

kuernetes resource object analysis error

Article directory 1. pod status 1.1 Types of container startup errors 1.2 ImagePullBackOff error 1.3 CrashLoopBackOff 1.4 Pending 2. Service connection status 3. Ingress connection status 1. pod status Create a pod-status.yaml apiVersion: v1 kind: Pod metadata: name: running labels: app: nginx spec: containers: – name: web image: nginx ports: – name: web containerPort: 80 […]