verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
wasiq has quit [Ping timeout: 250 seconds]
uzipaz has joined #mlpack
uzipaz has quit [Client Quit]
wasiq has joined #mlpack
uzipaz has joined #mlpack
< uzipaz> zoq: is there a way to build Neural nets in a generic way, I using the approach used in the test code and if I want to add more hidden/dropout/dropconnect layers, I have to change the soure code and recompile... is there an alternative?
uzipaz has quit [Quit: Page closed]
Nilabhra has joined #mlpack
wasiq has quit [Read error: Connection timed out]
wasiq has joined #mlpack
wasiq has quit [Read error: Connection timed out]
witness_ has joined #mlpack
Mathnerd314 has quit [Ping timeout: 248 seconds]
ranjan123 has joined #mlpack
ank_95_ has joined #mlpack
witness_ has quit [Quit: Connection closed for inactivity]
Nilabhra has quit [Ping timeout: 268 seconds]
Nilabhra has joined #mlpack
ank_95_ has quit [Quit: Connection closed for inactivity]
alpha__ has joined #mlpack
< alpha__> :uzipaz Heyy I also wanted to do something similar.. here is what I did
< alpha__> refer to this http://pastebin.com/bKKYPECQ
< alpha__> you can compile the program using g++ -std=c++11 Neural_network_using_mlpack.cpp -l mlpack -l armadillo -l boost_serialization -l boost_program_options
< alpha__> content of the cpp file given in pastebin link
< alpha__> let me know if it helps :)
Nilabhra has quit [Read error: Connection reset by peer]
Nilabhra has joined #mlpack
alpha__ has quit [Ping timeout: 250 seconds]
alpha__ has joined #mlpack
jerone has joined #mlpack
Nilabhra has quit [Remote host closed the connection]
decltypeme has joined #mlpack
ranjan123 has quit [Quit: Page closed]
alpha__ has quit [Ping timeout: 250 seconds]
Mathnerd314 has joined #mlpack
jerone has quit [Ping timeout: 250 seconds]
awhitesong1 has joined #mlpack
awhitesong has quit [Ping timeout: 268 seconds]
Nilabhra has joined #mlpack
uzipaz has joined #mlpack
awhitesong has joined #mlpack
awhitesong1 has quit [Ping timeout: 252 seconds]
awhitesong1 has joined #mlpack
awhitesong has quit [Ping timeout: 252 seconds]
< uzipaz> is the mlpack library inherently parallelized?
< zoq> uzipaz: Unfortunately no, some of the methods are parallelized using OpenMP.
< uzipaz> zoq: may I ask, what methods are parallelized?
< zoq> uzipaz: DET, and ranjan is working on a parallelized sgd optimizer.
< uzipaz> zoq: Im running FFN with 2291 input features and 842 training samples, with 2 hidden layers and the output layer following a dropout layer... it took about 6.5 hrs to train
< uzipaz> zoq: i used sgd as the optimizer with 100,000 max iterations
< zoq> uzipaz: wow, I used data sets with way more samples and features, in much less time.
< zoq> uzipaz: I would suggest, that you decrease the tolerance, but you said you set max iterations. I guess, you don't use a decent machine. Maybe you can send me your code and I'll take a look.
< zoq> * ah, I mean, I guess you use a decent machine
< uzipaz> zoq: that would be great! here is the link http://pastebin.com/3yrSm7Ar
< zoq> uzipaz: so not a raspberry pi or something like that
< uzipaz> zoq: i have core i5 laptop, with 2 physical, 4 virtual cores, each maxed out at around 2.8 ghz with 6 GB of memory
< zoq> uzipaz: okay, great
< zoq> uzipaz: Can you send me the dataset?
< uzipaz> zoq: just sent you an email
< zoq> uzipaz: Great, thanks!
< uzipaz> zoq: awesome, I look forward to hear your comments
< zoq> uzipaz: Just to be sure, you transform your complete dataset to a binary representation and not only the target values? It's uncommen to use a binary representation for the input values, so maybe there is a deeper reason behind it?
< uzipaz> i transformed to binary because all the features were nominal with 3 values each, the target class was already binary, i converted the nominal to binary to eliminate the numerical relationship between their values
< uzipaz> zoq:
< zoq> uzipaz: hm, okay
< uzipaz> zoq: though im not sure if its the best decision
< zoq> uzipaz: There are networks, that would benefit from a binary representation of the input parameter regarding runtime, because you could use bin-ops, but this is a pretty 'new' idea.
< uzipaz> zoq: you mean binary operations?
< zoq> uzipaz: yes
< uzipaz> zoq: but do have to explicitly program binary operations in our algorithm if we know the inputs are binary, shouldn't that be left for the compiler to decide?
< zoq> uzipaz: I'll have to look into the issue, but it might take some time, I'll have to do some other things first.
< uzipaz> zoq: sure, thanks for the insight, i was also thinking about using binary step function as the activation function because all the inputs are binary, i think that might increase performance
< zoq> uzipaz: If you transform everything to binary to increase the runtime you shouldn't use arma::Mat<double>, but yeah, it could increase the performance.
< uzipaz> zoq: I see, I didnt see that detail after converting to binary, thanks
< uzipaz> zoq: are you running the program with my dataset?
awhitesong1 has quit [Ping timeout: 260 seconds]
awhitesong has joined #mlpack
< zoq> uzipaz: I'll go and test the code with your dataset once I have time.
< uzipaz> zoq: I appreciate the help
tsathoggua has joined #mlpack
tsathoggua has quit [Client Quit]
uzipaz has quit [Quit: Page closed]
awhitesong has quit [Ping timeout: 260 seconds]
awhitesong has joined #mlpack
Nilabhra has quit [Remote host closed the connection]
K4k has quit [Quit: WeeChat 1.4]
K4k has joined #mlpack
uzipaz has joined #mlpack
< uzipaz> zoq: hey zoq, did you try running the program on my dataset i sent you?
< zoq> uzipaz: no, I can probably say more tomorrow, sorry
< uzipaz> zoq: no problem :) thanks for your time
uzipaz has quit [Quit: Page closed]
uzipaz has joined #mlpack
uzipaz has quit [Client Quit]
uzipaz has joined #mlpack
< uzipaz> zoq: Im sry to bother you over and over again... and also its late night in germany... I just wanted to ask for any tips/pointers to make my FFN train faster... any advice will be appreciated
< zoq> uzipaz: I think, it would be a good idea not to transform the input to a binary representation, that blows up the number of input samples.
< zoq> uzipaz: Also, I would use RMSprop instead of SGD, it should converge faster. Also use a lower tolerance, maybe 0.1 is sufficient.
< uzipaz> zoq: thanks, I've never heard of RMSprop, what is it formally called?
< zoq> uzipaz: RMSprop :)
< uzipaz> zoq: is that minibatch gradient descent?
< zoq> uzipaz: No, RMSprop is an "unpublished" method proposed by Geoffrey Hinton: https://github.com/mlpack/mlpack/tree/master/src/mlpack/core/optimizers/rmsprop
< uzipaz> zoq: also, even after 6hr training, my NN was overfitting on training set and performing not so good on the test set... any advice to improve upon this?
< zoq> uzipaz: Yeah, in this case you should definitely decrease the tolerance value. Unfortunately there isn't a method right now to test against a test set during training. What I do in this case is to Train in batches, and use the Predict function during this training batches to check how the method performs on the test set.
< zoq> Btw. we are in the same time zone right?
< uzipaz> zoq: im in canada, I am about 4 hrs behind you
< zoq> uzipaz: The problem is, everytime the the Train function is called, it's starts by evaluating the complete training set, to get an initial error. So, what I do in this case is to comment the evaluation method in the optimizer.
< zoq> uzipaz: ah, the other Verdun
< uzipaz> zoq: so, I will try using RMSprop and increase the tolerance value, not sure what more else to try
< zoq> uzipaz: ah right, increase
< uzipaz> zoq: in RMSprop class constructor, what is the difference between argument eps and tolerence?
< zoq> uzipaz: maybe, there is some weird bug, I guess I'll figure it out tommorow or later today
< uzipaz> zoq: in RMSprop class constructor, what is the difference between argument eps and tolerence?
< zoq> eps is used for numerical stability; to avoid division by zero. tolerance is the value used to terminate the optimize before it reaches the max iterations.
< zoq> (std::abs(lastObjective - overallObjective) < tolerance) break;
< zoq> So if you use a tolerance of 0.5 and use the Predict function on the training set; you should get an accuracy of 0.5 on the training set.
< zoq> using a tolerance of 0.4 you should get an accuracy of 0.4, and so on
< zoq> It's the same parameter as for all the other optimizer.
< uzipaz> zoq: so I should leave eps as default
< zoq> uzipaz: yes
< uzipaz> zoq: and also, if I set tolerance to 0.1, i should expect accuracy on training set to be 90percent?
< zoq> uzipaz: if the optimizer terminates before it reaches the max number of iterations, yes
< uzipaz> zoq: got it :), I suppose you are gonna go to sleep soon?
< zoq> uzipaz: nah
< zoq> uzipaz: You can always write to the channel, and we get back once we have the time. In case you think, you missed something; here are the channel logs: http://mlpack.org/irc/
< uzipaz> zoq: thanks, ill keep an eye out
< zoq> uzipaz: Do you use an modified MulticlassClassificationLayer class?
< uzipaz> zoq: no
< zoq> uzipaz: okay