Skip to content

Instantly share code, notes, and snippets.

View BIGBALLON's full-sized avatar
🎯
Focusing

WILL LEE BIGBALLON

🎯
Focusing
View GitHub Profile
@BIGBALLON
BIGBALLON / stickersdown.py
Created April 17, 2018 15:07
tgram stickers download script
# *-* coding: UTF-8 *-*
__author__ = 'BG'
import urllib2
import os
import re
class ZOLPIC:
def __init__(self):
if not os.path.exists('./PIC'):
os.mkdir(r'./PIC')
@BIGBALLON
BIGBALLON / test_tanh.sh
Created April 20, 2018 18:55
paper script
# 1
python3 train.py -b 128 -e 200 -d cifar10 -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -4 -tanh_end 4 -log ./cifar10_tb4_te4_lenet_1
python3 train.py -b 128 -e 200 -d cifar10 -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -3.5 -tanh_end 2.5 -log ./cifar10_tb35_te25_lenet_1
python3 train.py -b 128 -e 200 -d cifar10 -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -4 -tanh_end 2.5 -log ./cifar10_tb4_te25_lenet_1
python3 train.py -b 128 -e 200 -d cifar10 -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -2.5 -tanh_end 2.5 -log ./cifar10_tb25_te25_lenet_1
#
python3 train.py -b 128 -e 200 -d fashion_mnist -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -4 -tanh_end 4 -log ./fashion_mnist_tb4_te4_lenet_1
python3 train.py -b 128 -e 200 -d fashion_mnist -lr_m tanh_epoch -net lenet -depth 5 -width 1 -tanh_begin -3.5 -tanh_end 2.5 -log ./fashion_mnist_tb35_te25_lenet_1
python3 train.py -b 128 -e 200 -d fashion_mnist -lr_m tanh_epoch -net lenet -depth 5 -width 1 -ta
@BIGBALLON
BIGBALLON / extract_ILSVRC.sh
Created May 13, 2018 20:09
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import time
import random
import numpy as np
def debug_out(debug_str):
@BIGBALLON
BIGBALLON / VS code.md
Last active July 24, 2020 22:27
VS code setting for my ubuntu
  • extensions(插件):
    • C/C++
    • Python
    • Markdown All in One
    • Dracula Official
    • GitLens
  • settings:
    • Editor: Render Whitespace
      • boundary
  • Mouse Wheel Zoom
@BIGBALLON
BIGBALLON / czf_setup.sh
Last active February 20, 2019 09:25
holy shit!!!
# == czf setuo script ==
# == remove & install cuda ==
sudo apt-get update
sudo apt-get install vim screen htop curl -y
sudo apt-get purge cuda* -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
sudo bash cuda_8.0.61_375.26_linux-run --silent --toolkit
# == switch cuda version ==
@BIGBALLON
BIGBALLON / caffe2_setup.txt
Created November 8, 2018 07:33
caffe2 install
# == remove & install cuda ==
sudo apt-get update
sudo apt-get install vim screen htop curl -y
sudo apt-get purge cuda* -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
sudo bash cuda_8.0.61_375.26_linux-run --silent --toolkit
# == install cudnn 7.1.4 ==
@BIGBALLON
BIGBALLON / gogui_setup.sh
Created November 28, 2018 14:42
gogui_setup.sh
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt update
sudo apt install oracle-java8-installer -y
javac -version
cd ~/Download
wget https://jaist.dl.sourceforge.net/project/gogui/gogui/1.4.9/gogui-1.4.9.zip
unzip gogui-1.4.9
cd gogui-1.4.9/
sudo ./install.sh
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from caffe2.proto import caffe2_pb2
from caffe2.python.predictor import mobile_exporter
from caffe2.python import (
core,
brew,
cnn,
utils,
# -*-coding:utf-8-*-
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['sk_resnext29_8x64d', 'sk_resnext29_16x64d']
class SKConv(nn.Module):