摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such th... 阅读全文
posted @ 2018-06-14 15:18 zx-y 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Input: "babad"Outpu... 阅读全文
posted @ 2018-06-13 15:01 zx-y 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", ... 阅读全文
posted @ 2018-06-13 11:49 zx-y 阅读(115) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of th... 阅读全文
posted @ 2018-06-13 00:30 zx-y 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 起因: 我是在windows下格式化了ubuntu的盘,然后重新安装ubuntu就出现了这种问题。卸载ubuntu的正确姿势,要去查一下,千万不要直接格式化。解决方法:1. 先使用ls命令,找到ubuntu的安装在哪个分区: grub rescue>ls... 阅读全文
posted @ 2018-06-08 12:09 zx-y 阅读(5120) 评论(0) 推荐(0) 编辑
摘要: ubuntu安装分区安装ubuntu图1:Ubuntu Linux分区向导如果希望对分区过程进行完全控制,可以使用“其它”选项。单击“继续”按钮,安装向导将把用户带至手动分区界面,如图2所示。图2:手动分区模式在这里可以看到当前硬盘的分区信息 (这是网上找的图片)分区... 阅读全文
posted @ 2018-06-08 11:29 zx-y 阅读(779) 评论(0) 推荐(0) 编辑
摘要: sorted 函数接收一个key函数来实现自定义的排序# 训练集和验证集的文件命名不一样 # test1: data/test1/8973.jpg # train: data/train/cat.10004.jpg if self... 阅读全文
posted @ 2018-05-28 21:30 zx-y 阅读(140) 评论(0) 推荐(0) 编辑
摘要: vgg里面的 ReLU默认的参数inplace=True 当我们调用vgg结构的时候注意 要将inplace改成 False不然会报错RuntimeError: one of the variables needed for gradient computation ... 阅读全文
posted @ 2018-05-28 21:26 zx-y 阅读(6746) 评论(0) 推荐(2) 编辑
摘要: squeeze压缩的意思 就是在第几维为1 去掉unsqueeze 解缩 在第几维增加 变成*1squeeze用法c = b.view(1, 1, 1, 2, 3)c.squeeze(0) # 压缩第0维的“1”(0 ,0 ,.,.) = 0 1 2 3 ... 阅读全文
posted @ 2018-05-28 21:24 zx-y 阅读(215) 评论(0) 推荐(0) 编辑
摘要: ImageFolder一个通用的数据加载器,数据集中的数据以以下方式组织root/dog/xxx.pngroot/dog/xxy.pngroot/dog/xxz.pngroot/cat/123.pngroot/cat/nsdf3.pngroot/cat/asd932_... 阅读全文
posted @ 2018-05-28 21:22 zx-y 阅读(2943) 评论(0) 推荐(0) 编辑