Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by spangry on Tuesday April 18, 2017 @08:04PM
(#14144268)
I am a complete machine learning noob, so this could just be my lack of skill. Having looked at most of the popular ML frameworks, none of them seem to provide an easy, functional way to implement a custom 'neuron'. That is:
function (someinput):
output = do_stuff
return output
Which then gets passed on to the next layer. Again, it's quite possible I've just missed something, or there is some inherent ML limitation that makes this impossible. But if such a thing is possible, it would be a rather awesome feature from my POV.
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by Q6T46nT668w6i3m on Tuesday April 18, 2017 @09:58PM
(#14144873)
Many do. For example, the `Lambda` Layer from Keras:
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by spangry on Wednesday April 19, 2017 @06:47AM
(#14146817)
Yeah tried that one a while ago but didn't have much success. I'm a bit of a dummy when it comes to ML. That said, it looks like they've updated the documentation or something, so might be time to give it another whirl. Thanks for the reply.
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by IshKebab on Wednesday April 19, 2017 @08:45AM
(#14147301)
This is another area CNTK's 'BrainScript' excels. You can pretty much express it as normal maths:
https://github.com/Microsoft/CNTK/wiki/BrainScript-Activatio...
List of functions:
https://github.com/Microsoft/CNTK/wiki/BrainScript-Full-Func...
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by sirfz on Wednesday April 19, 2017 @07:00AM
(#14146875)
tensorflow's py_func allows you to do that, you can also write your own C++ operators, their API interface for that is pretty nice. In fact, you should be able to pretty much write any op you need by combining existing ops (maybe not as efficient as you'd like but yields the results you want).
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by spangry on Thursday April 20, 2017 @08:04AM
(#14155878)
Sorry I'm late to reply. This looks perfect for what I have in mind! Thanks!
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by dzhulgakov on Tuesday April 18, 2017 @03:35PM
(#14142138)
The recurrent network work is under way - we are revisiting the designs to consciously balance between performance and API niceness. We'll share more tech details in the upcoming days.
Right now, this is an example RNN:
https://github.com/caffe2/caffe2/blob/master/caffe2/python/e...
We use it for machine translation so the perf is nice.
If you have design feedbacks please let us know - we'll be really grateful.
Re:Caffe2: Open Source Cross-Platform Machine Learning Tools
by iraphael on Wednesday April 19, 2017 @10:09AM
(#14147790)
I know one of the biggest struggles of training RNNs in TensorFlow, for instance, is the fact that the graph is static. Other frameworks, like PyTorch, have dynamic graphs.
Will Caffe2 support dynamic graphs (perhaps down the line)? What is your reasoning behind whichever decision?
I've tried to work out how to do similar things in Torch and Tensorflow but all they really offer is pre-packaged layers like LSTM. If you want to make your own it's difficult, undocumented and not at all ergonomic.
How does Caffe2 compare?