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 -*- | |
""" | |
Demonstrates that cuDNN does not choose the fastest code path internally. | |
It first asks cuDNN to compute a particular full convolution as a forward | |
pass with sufficient zero padding of the input. | |
It then asks cuDNN to compute the same as a backward pass of a valid convolution | |
without zero padding of the input. |
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 -*- | |
""" | |
Compares some algorithms for computing a sliding median of an array. | |
Results: | |
scipy.signal.medfilt2d is a bit faster than scipy.ndimage.filter.median_filter | |
and significantly faster than scipy.signal.medfilt. | |
Maintaining a sorted list of the window becomes faster than that for a filter |
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
# -*- coding: utf-8 -*- | |
""" | |
Preliminary implementation of batch normalization for Lasagne. | |
Does not include a way to properly compute the normalization factors over the | |
full training set for testing, but can be used as a drop-in for training and | |
validation. | |
Author: Jan Schlüter | |
""" |
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 -*- | |
""" | |
Strips the pHYs chunk (resolution information) of a .png file. | |
Handy if pdflatex fails with "dimension too large" due to the | |
PNG resolution being set to 1. | |
For usage information, call without any parameters. |
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
#include <stdio.h> | |
#include <cuda.h> | |
#include <cuda_runtime_api.h> | |
/* Outputs some information on CUDA-enabled devices on your computer, | |
* including compute capability and current memory usage. | |
* | |
* On Linux, compile with: nvcc -o cuda_check cuda_check.c -lcuda | |
* On Windows, compile with: nvcc -o cuda_check.exe cuda_check.c -lcuda | |
* |
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 -*- | |
""" | |
Example employing Lasagne for digit generation using the MNIST dataset and | |
Deep Convolutional Generative Adversarial Networks | |
(DCGANs, see http://arxiv.org/abs/1511.06434). | |
It is based on the MNIST example in Lasagne: | |
http://lasagne.readthedocs.org/en/latest/user/tutorial.html |
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 -*- | |
""" | |
Example employing Lasagne for digit generation using the MNIST dataset and | |
Wasserstein Generative Adversarial Networks | |
(WGANs, see https://arxiv.org/abs/1701.07875 for the paper and | |
https://github.com/martinarjovsky/WassersteinGAN for the "official" code). | |
It is based on a DCGAN example: |
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 -*- | |
""" | |
Example employing Lasagne for digit generation using the MNIST dataset and | |
Least Squares Generative Adversarial Networks | |
(LSGANs, see https://arxiv.org/abs/1611.04076 for the paper). | |
It is based on a WGAN example: | |
https://gist.github.com/f0k/f3190ebba6c53887d598d03119ca2066 |
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 -*- | |
""" | |
Outputs some information on CUDA-enabled devices on your computer, | |
including current memory usage. | |
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1 | |
from C to Python with ctypes, so it can run without compiling anything. Note | |
that this is a direct translation with no attempt to make the code Pythonic. |
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
MIT License | |
Copyright (c) 2017 Jan Schlüter | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
OlderNewer