-
Install CMake 3.5.2 on CentOS 7
Download Source distributions cmake-3.5.2.tar.gz from https://cmake.org/download/ ./bootstrap gmake sudo gmake install
-
Install libgpuarray on Centos 7
- Install Celery and RabbitMQ on MAC:
pip install celery
brew install rabbitmq
- Basic
Create folder celery_try and create file tasks.py.
As configured in my dotfiles.
start new:
tmux
start new with session name:
Torch Notes
- How to use boolean variables in cmd:
cmd:option('--sample_patch', false, 'generate patch or image?')
So default is false, when one wants to turn that option on:
th myfile.lua --sample_path
- Writing network architecture in option:
A loss plotter for multiple losses visualized in Visdom, draw different losses within the same window.
class loss_plotter():
def __init__(self, port = 8097, server = "http://localhost"):
self.vis = visdom.Visdom(port=port, server=server)
assert self.vis.check_connection(timeout_seconds=3),'No connection could be formed quickly'
self.losses = {}
self.win = None
This file contains hidden or 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 | |
"""Find height, width of the largest rectangle containing all 0's in the matrix. | |
The algorithm for `max_size()` is suggested by @j_random_hacker [1]. | |
The algorithm for `max_rectangle_size()` is from [2]. | |
The Python implementation [3] is dual licensed under CC BY-SA 3.0 | |
and ISC license. | |
[1]: http://stackoverflow.com/questions/2478447/find-largest-rectangle-containing-only-zeros-in-an-nn-binary-matrix#comment5169734_4671342 |