ThisisasmalllibrarythatcantrainRestrictedBoltzmannMachines,andalsoDeepBeliefNetworksofstackedRBM's.TrainRBM's:%trainanRBMwithbinaryvisibleunitsand500binaryhiddenmodel=rbmBB(data,500);%visualizethelearnedweightsvisualize(model.W);Doclassification:model=rbmFit(data,500,labels);prediction=rbmPredict(model,testdata);TrainaDeepBeliefNetworkwith500,500,2000architectureforclassification:models=dbnFit(data,[5005002000],labels);prediction=dbnPredict(models,testdata);seeincludedexamplecodeformoreIcanbecontactedonandrej.karpathy@gmail.NOTE:ThiswasaclassprojectthatIworkedonfor1monthandthenabandoneddevelopmentforalmost4yearsago.Pleasedonotsendmespecificquestionsaboutissueswiththecodeorquestionsonhowtodosomething.Ionlyputthiscodeonlineinhopethatitcanbeusefultoothersbutcannotfullysupportit.Ifyouwouldlikepointerstomoreactivelymaintainedimplementations,havealookhere(https://github.com/rasmusbergpalm/DeepLearnToolbox)ormaybehere(https://github.com/lisa-lab/DeepLearningTutorials)Sorryandbestofluck!原文:http://code.google.com/p/matrbm/
2023/7/21 15:30:53
2.79MB
RBM
1