MMTM Multimodal Transfer Module for CNN Fusion

In general, fusion can be achieved at the input level (i.e. early fusion), decision level (i.e. late fusion), or intermediately [8]. Although studies in neuroscience [9, 10] and machine learning [1, 3] suggest that mid-level feature fusion could benefit learning, late fusion is still the predominant method utilized for mulitmodal learning [11–13]. This is mostly due to practical reasons.

Another reason for the popularity of late fusion is that the architecture of each unimodal stream is carefully designed over years to achieve state-of-the-art performance for each modality.

Java的ThreadLocal类

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package xyz.onns.juc;

/**
* @Author Onns
* @Date 2020/9/16 9:06 PM
* @Version 1.0
* @Website https://onns.xyz/blog/
*/
public class ThreadLocalTest {
public static ThreadLocal<String> stringThreadLocal = new ThreadLocal<>();

public static void main(String[] args) {
Thread thread = Thread.currentThread();
new Thread(() -> {
System.out.println(Thread.currentThread().getName() + ": ");
stringThreadLocal.set("This is a");
System.out.println(stringThreadLocal.get());
stringThreadLocal.remove();
System.out.println(stringThreadLocal.get());
}, "A").start();
new Thread(() -> {
System.out.println(Thread.currentThread().getName() + ": ");
stringThreadLocal.set("This is b");
System.out.println(stringThreadLocal.get());
stringThreadLocal.remove();
System.out.println(stringThreadLocal.get());
}, "B").start();

}
}

Leetcode题解:翻转二叉树

#226. 翻转二叉树

翻转一棵二叉树。

示例:

输入:

1
2
3
4
5
     4
/ \
2 7
/ \ / \
1 3 6 9

输出:

1
2
3
4
5
     4
/ \
7 2
/ \ / \
9 6 3 1

备注:

这个问题是受到Max Howell原问题启发的:

谷歌:我们 90%的工程师使用您编写的软件(Homebrew),但是您却无法在面试时在白板上写出翻转二叉树这道题,这太糟糕了。

今日的大坑:ssh密钥失效

像往常一样,日常备份一下服务器上的备份文件:

1
rsync -auv -e "ssh -i /home/deploy/.ssh/mi" --progress /home/deploy/common/ android@xm.onns.xyz:/home/android/

突然间我服务器炸了,ssh什么的都连不上了:

1
android@xm.onns.xyz: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Leetcode题解:零钱兑换

#322. 零钱兑换

给定不同面额的硬币coins和一个总金额amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回-1

示例1:

1
2
3
输入: coins = [1, 2, 5], amount = 11
输出: 3
解释: 11 = 5 + 5 + 1

示例2:

1
2
输入: coins = [2], amount = 3
输出: -1

说明:
你可以认为每种硬币的数量是无限的

Leetcode题解:斐波那契数

#509. 斐波那契数

斐波那契数,通常用F(n)表示,形成的序列称为斐波那契数列。该数列由01开始,后面的每一项数字都是前面两项数字的和。也就是:

1
2
F(0) = 0,   F(1) = 1
F(N) = F(N - 1) + F(N - 2), 其中 N > 1.

给定N,计算F(N)

示例1

1
2
3
输入:2
输出:1
解释:F(2) = F(1) + F(0) = 1 + 0 = 1.

示例2

1
2
3
输入:3
输出:2
解释:F(3) = F(2) + F(1) = 1 + 1 = 2.

示例3

1
2
3
输入:4
输出:3
解释:F(4) = F(3) + F(2) = 2 + 1 = 3.

提示:

0 ≤N≤ 30

Leetcode题解:单词搜索

#79. 单词搜索

给定一个二维网格和一个单词,找出该单词是否存在于网格中。

单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重复使用。

示例:

1
2
3
4
5
6
7
8
9
10
board =
[
['A','B','C','E'],
['S','F','C','S'],
['A','D','E','E']
]

给定 word = "ABCCED", 返回 true
给定 word = "SEE", 返回 true
给定 word = "ABCB", 返回 false

提示:

boardword中只包含大写和小写英文字母。
1 <= board.length <= 200
1 <= board[i].length <= 200
1 <= word.length <= 10^3