Skip to content

Instantly share code, notes, and snippets.

@ypwhs
ypwhs / random_seed_test.ipynb
Last active October 8, 2019 09:40
Keras 固定随机数种子重现相同的训练结果
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / residual_network.py
Created July 21, 2017 11:23 — forked from mjdietzx/residual_network.py
Clean and simple Keras implementation of residual networks (ResNeXt and ResNet) accompanying accompanying Deep Residual Learning: https://blog.waya.ai/deep-residual-learning-9610bb62c355.
"""
Clean and simple Keras implementation of network architectures described in:
- (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf).
- (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf).
Python 3.
"""
from keras import layers
from keras import models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / Invoke.cs
Created June 22, 2017 15:31
C# 线程操作UI
textBoxCMD.Invoke((MethodInvoker)delegate
{
textBoxCMD.AppendText(ex.Message);
});
@ypwhs
ypwhs / make_parallel.py
Created June 16, 2017 04:28
Keras 多 GPU 同步训练
from keras.layers.merge import Concatenate
from keras.layers.core import Lambda
from keras.models import Model
import tensorflow as tf
def make_parallel(model, gpu_count):
def get_slice(data, idx, parts):
shape = tf.shape(data)
size = tf.concat([ shape[:1] // parts, shape[1:] ],axis=0)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / 数据预览.ipynb
Created May 6, 2017 15:58
MsCelebV1-Faces-Aligned 数据预览
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / transfer_learning.ipynb
Last active April 19, 2017 10:15
transfer learning and fine tune
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / MouseTraceVisualization.ipynb
Last active April 15, 2017 13:29
鼠标轨迹可视化
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.