blob: 9e3aa93d93dc967a207fad4a2b4008ce04cac57b [file] [log] [blame]
#-------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#-------------------------------------------------------------
batch_size = ifdef($BATCH, 256)
mu = ifdef($MOMENTUM, 0.9)
step = ifdef($STEP, 1e-5)
decay = ifdef($DECAY, 0.95)
full_obj = ifdef($OBJ, FALSE)
fmt = ifdef($fmt, "text")
[W1, b1, W2, b2, W3, b3, W4, b4, hidden] = autoencoder_2layer(
X = read($X), W1_rand = read($W1_rand), W2_rand = read($W2_rand),
W3_rand = read($W3_rand), W4_rand = read($W4_rand), order_rand = read($order_rand),
num_hidden1 = $H1, num_hidden2 = $H2, max_epochs = $EPOCH, full_obj = full_obj,
batch_size = batch_size, step = step, decay = decay, mu = mu)
write(W1, $W1_out, format=fmt)
write(b1, $b1_out, format=fmt)
write(W2, $W2_out, format=fmt)
write(b2, $b2_out, format=fmt)
write(W3, $W3_out, format=fmt)
write(b3, $b3_out, format=fmt)
write(W4, $W4_out, format=fmt)
write(b4, $b4_out, format=fmt)