摘要:
题目描述 请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字符的路径。路径可以从矩阵中的任意一个格子开始,每一步可以在矩阵中向左,向右,向上,向下移动一个格子。如果一条路径经过了矩阵中的某一个格子,则之后不能再次进入这个格子。 例如 a b c e s f c s a d e e 这 阅读全文
摘要:
题目描述 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We% 阅读全文
摘要:
深度学习中定义的损失函数基本上都是极度非凸的函数,仅使用梯度下降法(SGD)很容易陷入局部最优解,本系列打算讲解以下方法: 1、SGD (On the importance of initialization and momentum in deep learning) 2、momentum 3、N 阅读全文
摘要:
torch.bmm(batch1, batch2, out=None) → Tensor Performs a batch matrix-matrix product of matrices stored in batch1 and batch2. batch1 and batch2 must be 阅读全文
摘要:
torch.ger(vec1, vec2, out=None) → Tensor Outer product of vec1 and vec2. If vec1 is a vector of size nn and vec2 is a vector of size mm, then out must 阅读全文
摘要:
numpy.expand_dims(a, axis) Expand the shape of an array. Insert a new axis that will appear at the axis position in the expanded array shape. Input ar 阅读全文