In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install dependencies | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
npm \ | |
nodejs \ | |
git; | |
# compatibility fix for node on ubuntu | |
RUN ln -s /usr/bin/nodejs /usr/bin/node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LAST EDIT: 30/11/2015 | |
//GULP 4 | |
var gulp = require('gulp'); | |
var merge = require('merge2'); | |
var source = require('vinyl-source-stream'); | |
var browserify = require('browserify'); | |
var uglify = require("gulp-uglify"); | |
var buffer = require('vinyl-buffer'); | |
var notify = require('gulp-notify'); | |
var nodemon = require('gulp-nodemon'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
########################################### | |
# | |
########################################### | |
# constants | |
baseDir=$(cd `dirname "$0"`;pwd) | |
# functions | |
# main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl; | |
server_name YOUR_URL; | |
root /usr/share/nginx/html; | |
client_max_body_size 100M; | |
ssl_certificate /certs/YOUR.cer; | |
ssl_certificate_key /certs/YOUR.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#=============================================================================== | |
# | |
# Copyright (c) 2017 <> All Rights Reserved | |
# | |
# | |
# File: /Users/hain/tmp/ltp_parser.py | |
# Author: Hai Liang Wang | |
# Date: 2018-04-12:18:49:38 |
layout | title | excerpt | category | tags | disqus | |
---|---|---|---|---|---|---|
post |
深度学习:调节网络超参数 |
在训练前,需要先规划超级参数,比如batch size, etc. |
development |
|
true |
使用神经网络完成分类,物体识别,序列化标注,问答,生成式对话、翻译、摘要已成为标准手段,在训练神经网络时,一个很难的地方是怎么调试网络的超参数,超参数影响了网络的收敛速度,也影响最终的结果。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A simple implementation of a greedy transition-based parser. Released under BSD license.""" | |
from os import path | |
import os | |
import sys | |
from collections import defaultdict | |
import random | |
import time | |
import pickle | |
SHIFT = 0; RIGHT = 1; LEFT = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Database management | |
*/ | |
import * as mongoose from 'mongoose'; | |
import logging from './logging.service'; | |
import config from '../config/environment'; | |
const logger = logging.getLogger('database.service'); | |
mongoose.Promise = Promise; | |
// 链接数据库 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mahout clusterdump \ | |
-dt sequencefile \ # format: {Integer => String} | |
-d reuters-vectors/dictionary.file-* \ # dictionary: {id => word} | |
-i reuters-kmeans-clusters/clusters-3-final \ # input | |
-o clusters.txt \ # output (local filesystem) | |
-b 10 \ # format length | |
-n 10 # number of top terms to print | |
--distanceMeasure org.apache.mahout.common.distance.CosineDistanceMeasure # default is euclidean distance |