Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
#!/usr/bin/env bash | |
################################################################################################# | |
# This script installls Torch7 and it's various dependencies. | |
# | |
# The script is adapted from: | |
# https://github.com/clementfarabet/torchinstall/blob/master/install | |
# | |
# The above didn't quite work for me on macosx (10.8.2) so the following adjustments were made: | |
# (1) install gcc 4.7.2 and set as compilers used in Torch build so open OpenMP works |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
CUDA_LIB_DIR=/usr/local/cuda/lib | |
CUDA_VERSION=7.5 | |
CUDA_LIBS="cublas cudart curand" | |
CUDNN_LIB_DIR=/usr/local/cuda/cudnn-3/lib | |
CUDNN_VERSION=7.0 | |
CUDNN_LIBS="cudnn" |
# Author: Kyle Kastner # License: BSD 3-Clause # For a reference on parallel processing in Python see tutorial by David Beazley # http://www.slideshare.net/dabeaz/an-introduction-to-python-concurrency # Loosely based on IBM example # http://www.ibm.com/developerworks/aix/library/au-threadingpython/ # If you want to download all the PASCAL VOC data, use the following in bash... """ #! /bin/bash # 2008 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2008/VOCtrainval_14-Jul-2008.tar # 2009 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar # 2010 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2010/VOCtrainval_03-May-2010.tar # 2011 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2011/VOCtrainval_25-May-2011.tar # 2012 wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar # Latest devkit wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar """ try: import Queue except ImportError: import queue as Queue import threading import ti |
import tensorflow as tf | |
from tensorflow.python.framework import ops | |
import numpy as np | |
# Define custom py_func which takes also a grad op as argument: | |
def py_func(func, inp, Tout, stateful=True, name=None, grad=None): | |
# Need to generate a unique name to avoid duplicates: | |
rnd_name = 'PyFuncGrad' + str(np.random.randint(0, 1E+8)) | |
import datetime as dt | |
import tensorflow as tf | |
import tensorflow.contrib.slim as slim | |
from tensorflow.contrib.slim.nets import resnet_v1 | |
import threading | |
from PoseDataset import PoseDataset | |
from TrainParams import TrainParams |
class weighted_categorical_crossentropy: | |
def __init__(self, weights): | |
self.weights = weights | |
self.__name__ = 'wcentroid_loss' | |
def __call__(self, y_true, y_pred): | |
class0 = K.ones_like(y_pred)[:, :, :, 0] * self.weights[0] | |
class1 = K.ones_like(y_pred)[:, :, :, 0] * self.weights[1] | |
x = K.tf.where(y_true[:, :, :, 0] > 0, class0, class1) | |
result = x * K.categorical_crossentropy(y_pred, y_true) |
First download the new old icon: https://cl.ly/mzTc (based on this)
You can also use the icon you want, but you need to convert it to .icns
. You can use this service to convert PNG to ICNS.
Go to Applications
and find VSCode
, right click there and choose Get Info
. Drag 'n drop the new icon.