0%

HTTP/HTTPS

适用于http协议:git clone http://***.git

1
2
3
4
5
6
7
8
vim ~/.gitconfig

[http]
proxy = socks5://127.0.0.1:10820
proxy = http://127.0.0.1:10821
[https]
proxy = socks5://127.0.0.1:10820
proxy = https://127.0.0.1:10821

SSH协议

适用于ssh协议git clone git@***.git

1
2
3
4
5
6
vim ~/.ssh/config

Host github.com
IdentityFile "C:\Users\hatak\.ssh\id_ed25519"
ProxyCommand connect.exe -H 127.0.0.1:10821 %h %p
# -H后是http代理

Prerequisite: Getting the Code

Part 1: Using command-line arguments

main函数开头需要加上下面的代码设置下日志的输出方式

1
2
3
4
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_ALL; // 默认就是控制台
settings.log_file_path = FILE_PATH_LITERAL("hello_world.log");
logging::InitLogging(settings);

Part 2: Callbacks and Bind

是个move-only对象

1
2
3
4
5
6
// The type of a callback that:
// - Can run only once.
// - Is move-only and non-copyable.
// - Takes no arguments and does not return anything.
// base::OnceClosure is an alias of this type.
base::OnceCallback<void()>

执行的时候要加std::move

1
2
3
4
5
6
7
8
void MyFunction1(base::OnceCallback<int(std::string, double)> my_callback) {
// OnceCallback
int result1 = std::move(my_callback).Run("my string 1", 1.0);

// After running a OnceCallback, it's consumed and nulled out.
DCHECK(!my_callback);
...
}

Part 3: Threads and task runners

Threading and Tasks in Chrome

There are a number of ways to post tasks to a thread pool or task runner.

  • PostTask()
  • PostDelayedTask() if you want to add a delay.
  • PostTaskAndReply() lets you post a task which will post a task back to your current thread when its done.
  • PostTaskAndReplyWithResult() to automatically pass the return value of the first call as argument to the second call.

参考链接

  1. C++ in Chromium 101 - Codelab
  2. GN Language and Operation

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

bottom-up-attention代码地址
尝试过直接在conda配置环境,然后代码年代久远,最后还是使用docker才配置成功

docker配置

docker镜像 docker pull bvlc/caffe

Makefile修改 参考https://www.codeleading.com/article/61395175040/
注:LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial不用添加

报错ImportError: cannot import name '_validate_lengths
运行pip install --upgrade scikit-image

报错ImportError: No module named _tkinter, please install the python-tk package
运行apt-get install the python-tk package

参考链接

  1. https://zhuanlan.zhihu.com/p/46616371

1
2
3
4
5
6
7
8
9
10
class String {
public:
// ctor
String(const char *cstr = 0);
// copy ctor
String(const String &str);
// copy op=
String &operator=(const String &str);
~String();
};

Big Three

  1. 编译器默认的copy ctorcopy op=都是bit by bit拷贝,类中含有指针时会有内存泄露
  2. 为什么copy op=返回引用
  3. 注意函数参数和返回值

Rvalue references and Move Semantics

跨模态检索相关文章
GSMN Graph Structured Network for Image-Text Matching
CVPR 2020 code

Saliency-Guided Attention Network for Image-Sentence Matching
ECCV 2019

Graph Structured Network for Image-Text Matching
CVPR 2020

Visual Semantic Reasoning for Image-Text Matching
ICCV 2019

Stacked Cross Attention for Image-Text Matching
ECCV 2018

VSE++: Improving Visual-Semantic Embeddings with Hard Negatives
BMVC 2018

Adaptive Offline Quintuplet Loss for Image-Text Matching
ECCV 2020
摘要 :文章提出了一种新的五元组损失

IMRAM: Iterative Matching with Recurrent Attention Memory for Cross-Modal Image-Text Retrieval
ECCV 2020
摘要

Unsupervised Generative Adversarial Cross-Modal Hashing
AAAI 2018
GAN

Creating Something from Nothing: Unsupervised Knowledge Distillation for Cross-Modal Hashing
CVPR 2020
Knowledge Distillation

Deep Cross-Modal Hashing
CVPR 2017
经典的深度哈希文章

1
2
3
4
5
int main() {
vector<int> a(0);
for (int i = 0; i < a.size() - 1; i++)
cout << a.size() - 1 << endl;
}

a.size()返回一个无符号整型,当a的大小是0时,a.size() - 1返回一个正数,导致访问越界。