-
git stash
保存当前的工作进度。会分别对暂存区和工作区的状态进行保存
-
git stash save "message..."
这条命令实际上是第一条 git stash 命令的完整版
| " Remember position of last edit and return on reopen | |
| if has("autocmd") | |
| au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | |
| endif |
| import torch | |
| class CompactBilinearPooling(torch.nn.Module): | |
| def __init__(self, input_dim1, input_dim2, output_dim, sum_pool = True): | |
| super(CompactBilinearPooling, self).__init__() | |
| self.output_dim = output_dim | |
| self.sum_pool = sum_pool | |
| generate_sketch_matrix = lambda rand_h, rand_s, input_dim, output_dim: torch.sparse.FloatTensor(torch.stack([torch.arange(input_dim, out = torch.LongTensor()), rand_h.long()]), rand_s.float(), [input_dim, output_dim]).to_dense() | |
| self.sketch_matrix1 = torch.nn.Parameter(generate_sketch_matrix(torch.randint(output_dim, size = (input_dim1,)), 2 * torch.randint(2, size = (input_dim1,)) - 1, input_dim1, output_dim)) | |
| self.sketch_matrix2 = torch.nn.Parameter(generate_sketch_matrix(torch.randint(output_dim, size = (input_dim2,)), 2 * torch.randint(2, size = (input_dim2,)) - 1, input_dim2, output_dim)) |
| #include <cuda_runtime.h> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <string> | |
| #include <iostream> | |
| #include <stdio.h> | |
| #include "caffe/caffe.hpp" |