Skip to content

Instantly share code, notes, and snippets.

@fvisin
fvisin / tensorflow_rename_variables.py
Last active February 6, 2022 07:09 — forked from batzner/tensorflow_rename_variables.py
Small python script to rename variables in a TensorFlow checkpoint
# Adapted from https://gist.github.com/batzner/7c24802dd9c5e15870b4b56e22135c96
import getopt
import sys
import tensorflow as tf
usage_str = ('python tensorflow_rename_variables.py '
'--checkpoint_dir=path/to/dir/ --replace_from=substr '
'--replace_to=substr --add_prefix=abc --dry_run')
find_usage_str = ('python tensorflow_rename_variables.py '
@article{dumoulin2016guide,
title="{A guide to convolution arithmetic for deep learning}",
author = {{Dumoulin}, Vincent and {Visin}, Francesco},
journal = {ArXiv e-prints},
eprint = {1603.07285},
year={2016},
month={mar}
}
@fvisin
fvisin / running_stats.py
Last active May 31, 2019 04:06
Running stats
class RunningStats:
"""Computes running mean and standard deviation
Adapted from:
*
<http://stackoverflow.com/questions/1174984/how-to-efficiently-\
calculate-a-running-standard-deviation>
* <http://mathcentral.uregina.ca/QQ/database/QQ.09.02/carlos1.html>
"""
def __init__(self):
@fvisin
fvisin / install_tensorflow.sh
Last active February 6, 2018 16:21
TF install script
TF_SOURCE_DIR="`pwd`/tensorflow"
WHEEL_DIR="$TF_SOURCE_DIR/tensorflow/wheel/"
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
##### Initialize variables #####
# Define a TMP dir
if [[ `hostname -d` == 'iro.umontreal.ca' ]] ; then
OUT_BASE="/Tmp/visin/bazel-cache"
else
OUT_BASE="/tmp/bazel-cache"
@misc{Visin_main_loop_TF,
author = {Francesco Visin},
title = {Main loop TF: a main loop for Tensorflow and custom data},
year = {2017},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/fvisin/main_loop_TF}}
}
@misc{Visin_dataset_loaders,
author = {F. Visin, A. Romero},
title = {Dataset loaders: a python library to load and preprocess datasets},
year = {2017},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/fvisin/dataset_loaders}}
}
@fvisin
fvisin / ReNet.bib
Created October 6, 2016 17:17
ReNet bibtex
@article{visin2015renet,
title={Renet: A recurrent neural network based alternative to convolutional networks},
author={Visin, Francesco and Kastner, Kyle and Cho, Kyunghyun and Matteucci, Matteo and Courville, Aaron and Bengio, Yoshua},
journal={arXiv preprint arXiv:1505.00393},
year={2015}
}
@fvisin
fvisin / ReSeg.bib
Created October 6, 2016 17:16
ReSeg bibtex
@InProceedings{,
author = {Visin, Francesco and Ciccone, Marco and Romero, Adriana and Kastner, Kyle and Cho, Kyunghyun and Bengio, Yoshua and Matteucci, Matteo and Courville, Aaron},
title = {ReSeg: A Recurrent Neural Network-Based Model for Semantic Segmentation},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2016}
}