自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

原创 配置新服务器环境

serverEnvironmentDrivers: 390.87CUDA 9.0 , cudnn 7.3.0,OS: Ubuntu 16.04Pre-installsudo apt-get updatesudo apt-get install -y wget vim git cmake unzip unar openssh-serverAnaconda3 (Python3.6...

2019-04-04 18:18:34 517

原创 attention

Created with Raphaël 2.2.0StartYour OperationYes or No?Endyesno

2019-01-09 12:46:29 251

转载 git删除远程文件夹或文件的方法

由于本地修改了文件夹大全名大小写的原因,同步到git上并不区分大小写,造成了一些文件同步不了,所以要先把git远程库上文件夹删除掉,然后再重新同步如下,我把dirs里的全部移除,但是本地文件还保留。git rm -r -n --cached */dirs/\* # -n:加上这个参数,执行命令时,是不会删除任何文件,而是展示此命令要删除的文件列表预览。git rm -r --c...

2018-12-21 21:52:18 3406

原创 将caffe预训练模型的权重载入pytorch

#!/usr/bin/env python2.7#coding=utf-8import caffeimport csvimport numpy as np# np.set_printoptions(threshold='nan')MODEL_FILE = 'inception_v3_rgb_deploy.prototxt'PRETRAIN_FILE = 'inception_v3...

2018-12-04 15:51:11 3064

原创 kinetics数据集路径txt生成

import osimport argparseparser = argparse.ArgumentParser()parser.add_argument('path', type=str, help='data_path of videos, absolute path')parser.add_argument('outfile', type=str, help='output.txt ...

2018-11-29 19:54:29 2748 12

原创 Python添加命令行参数

import argparseparser = argparse.ArgumentParser()parser.add_argument('dataset', type=str, choices=['ucf101', 'hmdb51'])parser.add_argument('split', type=int, choices=[1, 2, 3], ...

2018-11-27 10:29:14 1618

原创 Python使用装饰器计算函数运行时间

import datetimedef print_calc_time(func): def wrapper(*args, **kw): start_time = datetime.datetime.now() func(*args, **kw) end_time = datetime.datetime.now() ...

2018-11-26 21:32:30 1422 1

原创 NTU RGB+D Datasets

NTU RGB+D DatasetsBasic sizeThis dataset consists of 56,880 action samples containing 4 different modalities of data for each sample:RGB videos 136 GBdepth map sequencesMasked depth m...

2018-11-20 16:26:58 8823 10

原创 Singularity配置Pytorch0.4.1 + Anaconda3(Python3.5) + CUDA9.0 + CUDNN7.0

Singularity recipeBootstrap: dockerFrom:nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04%post echo 'nameserver 8.8.8.8' >> /etc/resolv.conf apt-get update apt-get install -y wget ...

2018-10-30 15:05:45 1354

原创 Python2.x /3.x UnicodeDecodeError 解决办法

报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2644: ordinal not in range(128)对于Python2.x :import sysreload(sys) sys.setdefaultencoding("utf-8")对于Python > 3.4 :...

2018-10-23 09:56:46 646

原创 Docker for Pytorch 0.4.1+anconda3+cuda9.0+cudnn7+ubuntu16.04

docker fileFROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04MAINTAINER yaotc "yaotiechui@gmail.com"# RUN rm /etc/apt/sources.list.d/*# RUN rm /etc/apt/sources.list.d/cuda.list# COPY sources.list...

2018-10-16 16:49:37 2071

原创 Python 批量移动文件

移动文件:sub1009.csv 结构为 | ID.jpg | Label |将./testb下的所有jpg文件,按照Label移动到不同文件夹import pandas as pdnames = pd.read_csv('sub1009.csv',header=None)# names.head()import os,shutildef movefile(srcfil...

2018-10-15 10:42:04 5390

原创 写csv

# transfor csv formatdef tras(filename): import pandas as pd df = pd.read_csv(filename,header=None) df[0] = df[0].str.split('.jpg').str[0] df.columns = ['name', 'cls'] df['...

2018-09-21 14:18:58 327

转载 pytorch ResNet 实现

from .BasicModule import BasicModulefrom torch import nnfrom torch.nn import functional as Fdef conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv...

2018-09-21 12:51:59 578

原创 Keras大坑

持续踩坑:如果model.fit中的参数suffle=True时,会随机打算每一次epoch的数据。(默认打乱),但是验证数据默认不会打乱。fit函数里,先执行validation_split 再 执行shuffle=True,所以val很有可能全是某一类样本了。3. ...

2018-08-15 18:40:18 980

原创 83. Remove Duplicates from Sorted List

题目 https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# ...

2018-06-29 21:24:44 184

原创 70. Climbing Stairs

题目 https://leetcode.com/problems/climbing-stairs/description/if n <= 1: return 1 if n == 2: return 2 if n > 2: return Solution().climbSt...

2018-06-29 17:45:53 185

原创 67. Add Binary

题目 https://leetcode.com/problems/add-binary/description/天秀class Solution: def addBinary(self, a, b): """ :type a: str :type b: str :rtype: str """ ..

2018-06-29 16:27:39 178

原创 69. Sqrt(x)

题目 https://leetcode.com/problems/sqrtx/description/好笨的方法:class Solution: def mySqrt(self, x): """ :type x: int :rtype: int """ if 0 < x and ( x ...

2018-06-29 14:52:40 181

原创 28. Implement strStr()

题目:https://leetcode.com/problems/implement-strstr/description/解决方案class Solution: def strStr(self, haystack, needle): """ :type haystack: str :type needle: str ...

2018-06-29 01:54:44 171

原创 66. Plus One

题目 https://leetcode.com/problems/plus-one/description/丑陋的代码:class Solution: def plusOne(self, digits): """ :type digits: List[int] :rtype: List[int] """ ...

2018-06-29 01:34:56 196

原创 58. Length of Last Word

题目 https://leetcode.com/problems/length-of-last-word/description/本来以为一句话就解决了:return len(s.split(' ')[-1])。。结果有点头晕。。class Solution: def lengthOfLastWord(self, s): """ ...

2018-06-29 00:34:17 144

原创 38. Count and Say

题目 https://leetcode.com/problems/count-and-say/description/class Solution: def countAndSay(self, n): """ :type n: int :rtype: str 1 11 21 ...

2018-06-28 20:44:52 161

原创 35. Search Insert Position

题目描述Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the ar...

2018-06-28 19:41:18 195

原创 sql(1) : 整合数据

1.读表Create table if not exists part1 as select * from odps_tc_257100_f673506e024.meinian_round2_data_part1;Create table if not exists part2 as select * from odps_tc_257100_f673506e024.meinian_round2_...

2018-06-28 16:44:37 551

转载 高质量的 LaTeX + CJK 模板

记录一个比较好的LaTex模版。mac下LaTex输入中文方法:%!TEX program = xelatex%!TEX TS-program = xelatex%!TEX encoding = UTF-8 Unicode\documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} %最新的mactex都有\d...

2018-05-15 13:50:32 2261

转载 Terminal命令行配置DNS方法

第一步:sudo vim /etc/resolv.conf第二步:添加ipv6 dnsnameserver 2001:4860:4860::8888nameserver 2001:4860:4860::8844第三步:重启网卡sudo /etc/init.d/networking restart 转载:https://jingyan.baidu.com/...

2018-05-12 00:03:51 1377

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除