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
def Custom_Conv(bottom): | |
import tensorflow as tf | |
#bottom is the previous layer. Her it is UpSampling2D layer | |
input_channels = int(bottom.get_shape()[-1]) | |
# initialize weights and biases using xavier | |
weights = tf.Variable(tf.truncated_normal(shape=[1, 1, input_channels, 1], dtype=tf.float32, stddev=tf.sqrt(1.0 / (1 * 1 * input_channels)))) | |
biases = tf.Variable(tf.constant(0, dtype=tf.float32, shape=[1])) |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>dl4j-quickstart</artifactId> | |
<groupId>org.deeplearning4j</groupId> | |
<version>1.0.0-beta4</version> | |
<packaging>jar</packaging> |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>dl4j-quickstart</artifactId> | |
<groupId>org.deeplearning4j</groupId> | |
<version>1.0.0-beta2</version> | |
<packaging>jar</packaging> |
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
# Simulated Annealing for Clustering Problems | |
import math | |
import random | |
num_objects = 10 # numbers of objects to be clustered | |
num_cost_increases = 100 | |
avg_cost_increase = 200 | |
acc_ratio = 0.75 # acceptance ratio should e between 0 and 1 | |
prob_e = 0.00000000001 # probability factor | |
beta = 0.125 | |
max_iter = 4 * num_objects # maximum number of iterations |