Two images A and B are given, represented as binary, square matrices of the same size. (A binary matrix has only 0s and 1s as values.) We translate on ...
分类:
其他好文 时间:
2019-04-08 13:24:52
阅读次数:
158
给定一个 n × n 的二维矩阵表示一个图像。将图像顺时针旋转 90 度。说明:你必须在原地旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要使用另一个矩阵来旋转图像。示例 1:给定 matrix = [ [1,2,3], [4,5,6], [7,8,9]],原地旋转输入矩阵,使其变为:[ [7 ...
分类:
其他好文 时间:
2019-04-07 22:06:31
阅读次数:
168
[TOC] 题目描述: 给定一个矩阵 , 返回 的转置矩阵。 矩阵的转置是指将矩阵的主对角线翻转,交换矩阵的行索引与列索引。 示例 1: 示例 2: 提示: 1. `1 transpose(vector & A) { int m = A.size(); int n = A[0].size(); ve ...
分类:
其他好文 时间:
2019-04-06 22:52:33
阅读次数:
130
题意 233 MatrixTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4039 &n ...
分类:
其他好文 时间:
2019-04-05 18:14:20
阅读次数:
139
代码如下: 如果要写蒟阵乘法的话,稍微修改一下就可以了: ...
分类:
其他好文 时间:
2019-04-04 20:19:51
阅读次数:
140
1. Element-wise Multiplication * torch.Tensor.mul() torch.mul() 2. Matrix Multiplication torch.Tensor.matmul() torch.matmul() torch.Tensor.mm() torch. ...
分类:
其他好文 时间:
2019-04-01 16:56:37
阅读次数:
150
Title: Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally ...
分类:
其他好文 时间:
2019-03-30 21:35:00
阅读次数:
171
要根据不同的目标选取合适的评估指标。 进行二分类问题的时候,数据集之间的不平衡,会导致评价指标accuracy很高,但是却不能反应模型的好坏。 sklearn.metrics.confusion_matrix 如果标记数字的话,则按标签从小到大排序,如果为字符型的化,自己设计labels参数来表示其 ...
分类:
其他好文 时间:
2019-03-30 10:42:44
阅读次数:
145
1 #include "000库函数.h" 2 3 //找位置规律 4 //先不按照规则,使用另一个矩阵 5 class Solution { 6 public: 7 void rotate(vector>& matrix) { 8 vector >v = matrix; 9 int n = mat... ...
分类:
编程语言 时间:
2019-03-28 15:27:16
阅读次数:
158
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 while(cin >> n) { 9 vector> matrix(n, vector(n)); 10 int count = 0; 11 for(... ...
分类:
其他好文 时间:
2019-03-27 19:47:51
阅读次数:
204