Skip to content

Instantly share code, notes, and snippets.

View gyk's full-sized avatar

Yukun Guo gyk

  • Hangzhou, China
  • 13:12 (UTC +08:00)
View GitHub Profile
@gyk
gyk / trySAE.matlab
Created July 17, 2014 06:23
Stacked Denoising Auto-Encoder of DeepLearnToolbox (https://github.com/rasmusbergpalm/DeepLearnToolbox) - a simple example
% Playing with the Stacked Denoising Auto-Encoder in the DeepLearnToolbox
% (https://github.com/rasmusbergpalm/DeepLearnToolbox),
% and trying to use it to extract features.
%% Loads data
load mnist_uint8;
% I don't have much memory
clear test_x test_y
(* ::Package:: *)
heron[side1_,side2_,base_]:=Module[{p,s},(
p=(side1+side2+base)/2;
s=Sqrt[p (p-side1)(p-side2)(p-base)])]
getHeight[side1_,side2_,base_]:=Module[{cos,sin,h},(
cos=(side1*side1+base*base-side2*side2)/(2*side1*base);
sin=Sqrt[1-cos*cos];