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
with tf.variable_scope("dataset"): | |
train_values = tf.constant([[1,2,3],[2,3,4], | |
[3,4,2],[2,1,5], | |
[1,7,3],[2,2,7], | |
[0,1,0],[0,1,0], | |
[0,1,0],[0,1,0]]) | |
train_labels = tf.constant([1, 0, 0, 1, 1, 1,0,1,0,0]) | |
# 1) no shuffling, so the outcome would be deterministic | |
# 2) make one dataset object from train_values and train_labels |
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
"""Simple example on how to log scalars and images to tensorboard without tensor ops.""" | |
__author__ = "Michael Gygli" | |
import tensorflow as tf | |
from StringIO import StringIO | |
import matplotlib.pyplot as plt | |
import numpy as np | |
class Logger(object): | |
"""Logging in tensorboard without tensorflow ops.""" |
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
#!/bin/bash | |
IPT="/sbin/iptables" | |
### Interfaces ### | |
PUB_IF="eth0" # public interface | |
PRV_IF="eth1" # private interface | |
LO_IF="lo" # loopback | |
SERVER_IP=$(ifconfig eth0 | grep 'inet addr:' | awk -F'inet addr:' '{ print $2}' | awk '{ print $1}') |