clementfarabet / torch-ios

Torch7 for iOS.
Other
196 stars 42 forks source link

Way to support as many as I want packages in 3rdpaty #17

Closed notimesea closed 5 years ago

notimesea commented 8 years ago

Hi!

I'm interested is it possible to generate framework with any packages which I want to use in project in some convienient way?

E.g. if I want to use 'rnn' package I could add this package to "3rdparty" directory and recompile framework or maybe simpler?

jfsantos commented 8 years ago

I made some changes to add the 'rnn' package (and it's dependency, 'dpnn') to the framework and updated the Objective-C code to load both, but it did not work. I basically added both packages to the 3rdparty folder and copied them to the framework as already done for the other packages. Since both packages are Lua-only, there's no need to compile any code, but I'm not sure what else needs to be done to be able to load them.

soumith commented 8 years ago

Did you make all changes like here: https://github.com/clementfarabet/torch-ios/search?utf8=%E2%9C%93&q=nnx

Especially: [self requireFrameworkPackage:@"rnn" frameworkResourcesPath:frameworkResourcesPath];

jfsantos commented 8 years ago

Yes, I added calls to requireFrameworkPackage to 'rnn' and to all its dependencies ('dpnn', which on turn depends on 'moses'), just in case. All calls to requireFrameworkPackage or require in Torch.m are failing, even though the files are in the correct place in Torch.framework. I'm currently trying to debug to find out what's wrong.

Do I have to remove any calls to require from the Lua files before adding them to the 3rdparty folder?

jfsantos commented 8 years ago

Update: apparently it's a problem with dpnn. I currently cannot load it. I Initially thought it was a problem with moses, but that was easy to fix. I'll ask @nicholas-leonard about it.

@soumith and @clementfarabet: Would you be interested in officially adding rnn to torch-ios? I could submit a PR as soon as I get it working.

soumith commented 8 years ago

i'll frankly merge whatever is sent my way into torch-ios. In fact, I am happy to give commit rights to whoever wants them....

jfsantos commented 8 years ago

Alright, I'll ping you as soon as I get this to work.

Toomaie commented 8 years ago

@jfsantos Having some issues adding nngraph right now. I'd be interested in knowing how you added rnn and its dependencies. Thanks!

lazerwalker commented 8 years ago

@TomOlivier I'm also trying (and failing) to add nngraph, would be curious if you've found anything out in the past two weeks

(and will obviously throw anything your way if I make a breakthrough)

liamnaka commented 7 years ago

Has anyone had any success yet with loading nngraph?

lazerwalker commented 7 years ago

I managed to get a project compiling with nngraph included.

Sadly, trying to actually sample from my network on-device yielded a large number of nondeterministically-occurring memory crashes. The lua code wasn't my own (it was char-rnn with a dataset trained by someone else), and I quickly reached a point where trying to debug it myself didn't make sense, so I sadly can't tell you if my problems were due to nngraph or user-space Lua.

Happy to upload my project if it'd help.

soumith commented 7 years ago

this project really needs a revamp, but none of the folks who are familiar with the code have the time. It should really be marked as depreceated so that folks dont waste their time with the promise that this works. The packages need to really be updated, they are years old. Without that, there'll be lots of side effects.

liamnaka commented 7 years ago

@lazerwalker If you have the time, that would be fantastic! It's really sad to see this port abandoned, hopefully someone can update it someday. When I can, I'll update you with my progress using nngraph. :)