Skip to content

Investigate the DCNN idea #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ujh opened this issue Nov 29, 2015 · 19 comments
Open

Investigate the DCNN idea #234

ujh opened this issue Nov 29, 2015 · 19 comments

Comments

@ujh
Copy link
Owner

ujh commented Nov 29, 2015

There's some free DCNN data out there. Maybe it's worthwhile to try to integrate it into the bot. Especially as a new prior once the prior calculation has been move into a separate thread (issue #233).

@ujh ujh added the feature label Nov 29, 2015
@ujh ujh added this to the 0.4.0 milestone Nov 29, 2015
@ujh
Copy link
Owner Author

ujh commented Nov 30, 2015

Even though there are caffe bindings for Rust it seems that installing caffe is quite a big issue. It seems that the better solution would be to convert the trained DCNN to Tensorflow file format (see also here).

@iopq
Copy link
Collaborator

iopq commented Nov 30, 2015

But how to use Tensorflow? Are there Rust bindings for that? I got caffe to compile on my VM

@ujh
Copy link
Owner Author

ujh commented Nov 30, 2015

Both solutions aren't ideal. If it were up to me I'd have a solution that doesn't require an external library. To be honest though, I haven't checked either solution yet. I assume if we do either we loose the statically linked binaries and Windows support will probably be even worse. 👎

@iopq
Copy link
Collaborator

iopq commented Dec 1, 2015

It's not really worse, it's just "feature not supported on Windows"

considering it's not supported on Windows OR Linux right now it would be an improvement to implement it

@ujh
Copy link
Owner Author

ujh commented Dec 1, 2015

Ha! That's a way to look at it. 😁

I don't even know how that would work though. But it's something to figure out. I mean, ideally the executable would check at runtime if it can load the library (e.g. Caffe) and then either turn on that feature or not. This way we could keep the prebuilt executables. Otherwise we would need to use some kind of conditional compilation. I assume that exists in Rust too.

@iopq
Copy link
Collaborator

iopq commented Dec 23, 2015

There are bindings for tensorflow to Rust ( https://github.com/ajtulloch/tensorflow-rs ) but there are no binaries for Tensorflow for Windows either.

@ujh
Copy link
Owner Author

ujh commented Jan 28, 2016

Now with Google entering the game I think it's finally time to seriously investigate this.

  1. Figure out if it's possible to statically link the caffe library. That way we have at least standalone binaries.
  2. Only build in this feature for platforms that are actually supported by Caffe.

@ujh ujh modified the milestones: 0.3.3, 0.4.0 Jan 28, 2016
@ujh
Copy link
Owner Author

ujh commented Feb 3, 2016

Maybe it would be worthwhile to investigate Leaf and see if we can't use that instead.

@iopq
Copy link
Collaborator

iopq commented Feb 3, 2016

investigated, not usable until they have a serialization format (which they'll have eventually)

@ujh
Copy link
Owner Author

ujh commented Feb 3, 2016

Thanks. Maybe they'll have one once we get around to actually implementing this. 😝

@ujh ujh removed this from the 0.3.3 milestone May 1, 2016
@ujh
Copy link
Owner Author

ujh commented Jun 9, 2016

I just tried to build caffe.rs and I gave up after a while, so that seems to be out. And as you said, the serialisation and deserialisation of Leaf isn't complete yet. On top of that it requires you to install capnp which also isn't ideal as I'd prefer a solution with zero dependencies. I'll try to build tensorflow.rs and see how that goes. At least I'll know how to use a DCNN now and maybe I can switch to leaf when it's ready.

@ujh
Copy link
Owner Author

ujh commented Jun 9, 2016

https://github.com/google/tensorflow-rust doesn't work on OSX. I'll try the other library next.

@iopq
Copy link
Collaborator

iopq commented Jun 9, 2016

I built caffe.rs just fine on Linux. I just need to figure out how to use it, though.

@ujh
Copy link
Owner Author

ujh commented Jun 9, 2016

That's a good point! I have a Linux VM running here so I could give that a go. It's a technology preview only anyway.

Am 09.06.2016 um 18:04 schrieb iopq notifications@github.com:

I built caffe.rs just fine on Linux. I just need to figure out how to use it, though.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@ujh
Copy link
Owner Author

ujh commented Jun 16, 2016

Now that leaf is dead I'm back to yet another idea. As I don't want caffe, torch, or tensorflow as a dependency I've been thinking of the following:

What if we train the DCNN on some of the existing tools and then convert it to Rust? Implementing the NN parts we need in Rust isn't a small effort but certainly doable. Then we have the power of those tools available for training but we would still end up with a bot with zero dependencies. And as a side effect I would understand those NNs in detail. 😁

Anyway, that's all just wishful thinking for now. I'll see what I can come up with in terms of small and doable partial steps.

@ujh
Copy link
Owner Author

ujh commented Jun 20, 2016

It turns out that compiling caffe.rs isn't that hard after all.

@ujh
Copy link
Owner Author

ujh commented Jun 20, 2016

See #294.

@ujh
Copy link
Owner Author

ujh commented Jun 21, 2016

tensorflow-rust is now also working on OSX. I think we're getting there. Although in the end it would still like to have a NN library written purely in Rust to run the net so that I don't have to have dependencies on third party software to be installed.

@ujh
Copy link
Owner Author

ujh commented Sep 30, 2016

I will put this back into the backlog for now. It's a big undertaking that I will eventually tackle but not now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants