"nvidia-smi has failed because it couldn't communicate with the NVIDIA driver"
- Disable Secure Boot
-- original code: https://github.com/ericelliott/cuid | |
-- Add the "plv8" extension | |
create extension if not exists "plv8"; | |
-- Add the "pgcrypto" extension | |
create extension if not exists "pgcrypto"; | |
\dx | |
-- Connect a database |
import keras.backend as K | |
import tensorflow as tf | |
from keras.layers import Layer | |
"""Not tested, I'll play around with GANs soon with it.""" | |
class CoordConv2D(Layer): | |
def __init__(self, channel, kernel, padding='valid', **kwargs): | |
self.layer = Conv2D(channel, kernel, padding=padding) |
#!/bin/bash | |
docker run -it --rm --privileged --net host \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $PWD:$HOME/workspace \ | |
-v $HOME/.Xauthority:$HOME/.Xauthority \ | |
-e HOME=$HOME \ | |
-e DISPLAY=$DISPLAY \ | |
--entrypoint /usr/sbin/ffmpeg \ | |
kfei/ffmpeg $* |
#!/bin/bash | |
docker run -it --rm --privileged --net host \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $PWD:$HOME/workspace \ | |
-v $HOME/.Xauthority:$HOME/.Xauthority \ | |
-e HOME=$HOME \ | |
-e DISPLAY=$DISPLAY \ | |
--entrypoint /usr/sbin/ffmpeg \ | |
kfei/ffmpeg $* |
import numpy as np | |
import tensorflow as tf | |
import matplotlib.pyplot as plt | |
from tensorflow.contrib.distributions import Bernoulli | |
class VariationalDense: | |
"""Variational Dense Layer Class""" | |
def __init__(self, n_in, n_out, model_prob, model_lam): | |
self.model_prob = model_prob |
FLAGS = flags.FLAGS | |
if FLAGS.log_dir: | |
if not os.path.exists(FLAGS.log_dir): | |
os.makedirs(FLAGS.log_dir) | |
logging.get_absl_handler().use_absl_log_file() |
""" | |
Clean and simple Keras implementation of network architectures described in: | |
- (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf). | |
- (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf). | |
Python 3. | |
""" | |
from keras import layers | |
from keras import models |
# cuda | |
export PATH=/usr/local/cuda-9.2/bin${PATH:+:${PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH | |
# python | |
alias env='source ./env/bin/activate' |
"nvidia-smi has failed because it couldn't communicate with the NVIDIA driver"
import six | |
import tensorflow as tf | |
from tensorflow.python.framework import ops | |
from tensorflow.python.training import training_util | |
from tensorflow.python.training.session_run_hook import SessionRunArgs | |
class RayTuneReportingHook(tf.train.SessionRunHook): | |
def __init__(self, params, reporter): | |
self.reporter = reporter |