当前位置:网站首页>Gram matrix
Gram matrix
2022-06-26 05:46:00 【SP FA】
About Gram matrix
n Any... In a dimensional Euclidean space k A matrix formed by the inner product of two vectors , It's called this k A vector Gram matrix .
Vector inner product formula : a ⃗ ⋅ b ⃗ = ∑ i = 1 n a i b i \vec a\cdot\vec b=\sum\limits_{i=1}^na_ib_i a⋅b=i=1∑naibi therefore Gram The formula of a matrix is : G r a m ( a ⃗ 1 ⋯ a ⃗ k ) = ( ( a ⃗ 1 ⋅ a ⃗ 1 ) ⋯ ( a ⃗ 1 ⋅ a ⃗ k ) ⋮ ⋱ ⋮ ( a ⃗ k ⋅ a ⃗ 1 ) ⋯ ( a ⃗ k ⋅ a ⃗ k ) ) Gram(\vec a_1\cdots\vec a_k)=\begin{pmatrix}(\vec a_1\cdot\vec a_1)&\cdots&(\vec a_1\cdot\vec a_k)\\\vdots&\ddots&\vdots\\(\vec a_k\cdot\vec a_1)&\cdots&(\vec a_k\cdot\vec a_k)\end{pmatrix} Gram(a1⋯ak)=⎝⎜⎛(a1⋅a1)⋮(ak⋅a1)⋯⋱⋯(a1⋅ak)⋮(ak⋅ak)⎠⎟⎞
It can be seen that ,Gram A matrix is a symmetric matrix .
Gram The matrix can be regarded as the eccentric covariance matrix between the data ( That is, the covariance matrix without subtracting the mean , The covariance matrix can be seen in This article )
Gram Application of matrix
For a set of features , We calculate its Gram matrix , It can reflect the correlation between two features . The elements on the diagonal can be understood as the information of the feature , The rest of the elements provide information about the relevance of different features , What are the characteristics of such a matrix , It can also reflect the closeness of different characteristics .
Gram The most direct application of matrix is in the field of image style transfer . For a picture , We want to extract its style , We need to use the network to extract local texture features 、 Image outline and other information , And then calculate Gram matrix , We can find out the correlation between features , This calculated Gram The matrix reflects the style of the image . At this point, if you want to compare the style similarity between the two pictures , Just compare their Gram matrix , if Gram The difference of matrix is small , It can be considered that the two images are similar in style .
边栏推荐
猜你喜欢

组合模式、透明方式和安全方式

通俗易懂的从IDE说起,再谈谈小程序IDE
![Operator priority, associativity, and whether to control the evaluation order [detailed explanation]](/img/c3/a646a7c7cb82e00746923f7b023058.jpg)
Operator priority, associativity, and whether to control the evaluation order [detailed explanation]

Henkel database custom operator '~~‘

国务院发文,完善身份认证、电子印章等应用,加强数字政府建设

【ARM】讯为rk3568开发板buildroot添加桌面应用

When was the autowiredannotationbeanpostprocessor instantiated?

【ARM】在NUC977上搭建基于boa的嵌入式web服务器

redis探索之布隆过滤器
![[arm] build boa based embedded web server on nuc977](/img/fb/7dc1898e35ed78b417770216b05286.png)
[arm] build boa based embedded web server on nuc977
随机推荐
LeetCode_二叉搜索树_简单_108.将有序数组转换为二叉搜索树
电商借助小程序技术发力寻找增长突破口
11 IO frame
Last flight
Redis usage and memory optimization
一段不离不弃的爱情
Posting - don't get lost in the ocean of Technology
Cyclic displacement
生命原来如此脆弱
冒泡排序(Bubble Sort)
12 multithreading
Redis discovery bloom filter
Command line interface of alluxio
自定义WebSerivce作为代理解决SilverLight跨域调用WebService问题
Pytorch (environment, tensorboard, transforms, torchvision, dataloader)
机器学习 05:非线性支持向量机
Mise en file d'attente des messages en utilisant jedis Listening redis stream
Some doubts about ARP deception experiment
LeetCode_ Binary search tree_ Simple_ 108. convert an ordered array to a binary search tree
ZigBee explain in simple terms lesson 2 hardware related and IO operation