Sirin Schariac

Thinking will not overcome fear but action will.

LeetCode 34:Find First and Last Position of Element in Sorted Array

二分查找

排序数组查找元素第一个和最后一个 原题 34. 在排序数组中查找元素的第一个和最后一个位置 - 力扣(LeetCode) 题目解析 这一题目是一个典型的二分查找,不过考察的细节更多,需要对于二分查找有一个比较深入的理解。 题目的核心问题:对于一个元素,找到其在数列中的开始和结束位置。这一问题可以转化为,找到第一个target和第一个大于target的元素。此时我们发现,传统...

Golang Sclices

append slices的细节

关于Golang中的slices append操作 在Leetcode回溯相关的题目中(e.g. 131. 分割回文串 - 力扣(LeetCode)),涉及到对于回溯过程中得到的多种方案的答案合并问题,采用的是ans = append(ans, append([]string(nil), splits...)),这就引出一个问题,为什么不直接采用ans = append(ans, spli...

UMich DL for CV

Generative Models-2

Generative Adversarial Networks Generative Models Review Autoregressive Models directly maximize likelihood of training data \(p_{\theta}(x)=\prod_{i=1}^N p_{\theta}(x_i|x_1,\dots,x_{i-1})\) Var...

UMich DL for CV

Generative Models-1

判别模型与生成模型 Component Supervised Learning Unsupervised Learning Data (x: data, y: label) (x: data) Goal learn a fun...

UMich DL for CV

Attention

Attention Machine Translation (seq2seq) Here $a_{ij}$ represents the weights of input sequence predicted by the attention. e.g., if the word ‘estamos’ = ‘eating’, then maybe $a_{23}=0.8\;a_{21...

UMich DL for CV

Recurrent Neural Networks

Recurrent Neural Networks Key idea RNNs have an “internal state” that is updated as a sequence is processed, the recurrence formula looks like $h_t = f_W(h_{t-1},x_t)$. Here $h_t$ is the state a...

UMich DL for CV

Convoluntional Network

Convolutional Network Why Convolutional Network? So far our classifiers don’t respect the spatial structure of images (merely stretch pixels into column). Thus new operators is needed to han...

Continual Learning

An Intro to continual learning

Continual Learning What is continual learning 一般来说,ML是在一个固定的数据集上针对特定的下流任务来训练一个相应的模型。但对于现实世界的任务而言,环境是在不断变化着的,人的智能是在不断学习的,而之前学过的知识也会保留。因此,Continual Learning被提出,旨在让模型能够从新任务中学习,完成新的目标的同时,保持其在原有数据...

UMich DL for CV

Neural Network

Neural Network Feature Transformation for example, the original space is a Cartesian coordinate system. After mathematic transformation, we can turn it into Polar coordinate system, called featur...

GNU Makefile

make and cmake

Makefile 1. Makefile规则 target ... : prerequisites command ... ... target是这个makefile指定的操作所要产生的目标,可以是一个目标文件object file,也可以是一个可执行文件,也可以是一个标签label prerequisites是生成target所需要的依赖文件 command是生...