Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
#if defined(__MACH__) | |
#include <mach/clock.h> | |
#include <mach/mach.h> | |
#endif | |
#if !defined(__WIN32__) | |
#include <sys/stat.h> | |
#include <sys/types.h> |
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 bash | |
set -e | |
# install cuda-7.5 | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
sudo apt-get update | |
sudo apt-get install -y linux-image-extra-`uname -r` linux-headers-`uname -r` linux-image-`uname -r` | |
sudo apt-get install -y cuda-7-5 | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:\$LD_LIBRARY_PATH" | tee -a ~/.profile | tee -a ~/.bashrc |
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
def fit(args, network, data_loader, batch_end_callback=None): | |
# kvstore | |
kv = mx.kvstore.create(args.kv_store) | |
model_prefix = args.model_prefix | |
if model_prefix is not None: | |
model_prefix += "-%d" % (kv.rank) | |
save_model_prefix = args.save_model_prefix | |
if save_model_prefix is 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
/*! | |
* Copyright (c) 2015 by Contributors | |
* \file leaky_relu-inl.h | |
* \brief leaky relu family operator | |
* \author Bing Xu | |
*/ | |
#ifndef MXNET_OPERATOR_PROD_SUM_INL_H_ | |
#define MXNET_OPERATOR_PROD_SUM_INL_H_ | |
#include <dmlc/logging.h> |
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
import os | |
import mxnet as mx | |
from common import models | |
import pickle as pkl | |
def test_softmax_with_shape(shape, xpu): | |
X = mx.symbol.Variable('X') | |
L = mx.symbol.Variable('L') | |
Y = mx.symbol.Softmax(data=X, label=L) | |
x = mx.random.uniform(-1, 1, shape, ctx = xpu) |