GithubHelp home page GithubHelp logo

rustnn's People

Contributors

guersam avatar jackm321 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rustnn's Issues

Build is failing

RustNN$ cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling threadpool v0.1.4
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/threadpool-0.1.4/src/lib.rs --crate-name threadpool --crate-type lib -g -C metadata=213781c0d8fba90b -C extra-filename=-213781c0d8fba90b --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling libc v0.1.6
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.6/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature="default" --cfg feature="cargo-build" -C metadata=9b7976990ae0dbd4 -C extra-filename=-9b7976990ae0dbd4 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling gcc v0.3.5
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.5/src/lib.rs --crate-name gcc --crate-type lib -g -C metadata=982b24959a427c6e -C extra-filename=-982b24959a427c6e --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling rustc-serialize v0.3.14
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-serialize-0.3.14/src/lib.rs --crate-name rustc_serialize --crate-type lib -g -C metadata=9ef26f158d5284e0 -C extra-filename=-9ef26f158d5284e0 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -Awarnings`
   Compiling rand v0.3.8
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.8/src/lib.rs --crate-name rand --crate-type lib -g -C metadata=b924d9fc5b3eb5b8 -C extra-filename=-b924d9fc5b3eb5b8 --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern libc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib -Awarnings`
   Compiling time v0.1.25
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.25/build.rs --crate-name build_script_build --crate-type bin -C prefer-dynamic -g --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern gcc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libgcc-982b24959a427c6e.rlib -Awarnings`
     Running `/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/build-script-build`
     Running `rustc /home/swiesend/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.1.25/src/lib.rs --crate-name time --crate-type lib -g -C metadata=e758cbe877e9589d -C extra-filename=-e758cbe877e9589d --out-dir /home/swiesend/workspace/rust/RustNN/target/debug/deps --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern libc=/home/swiesend/workspace/rust/RustNN/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib -Awarnings -L native=/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/out -l static=time_helpers`
   Compiling nn v0.1.5 (file:///home/swiesend/workspace/rust/RustNN)
     Running `rustc src/lib.rs --crate-name nn --crate-type lib -g --out-dir /home/swiesend/workspace/rust/RustNN/target/debug --emit=dep-info,link -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug -L dependency=/home/swiesend/workspace/rust/RustNN/target/debug/deps --extern time=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libtime-e758cbe877e9589d.rlib --extern threadpool=/home/swiesend/workspace/rust/RustNN/target/debug/deps/libthreadpool-213781c0d8fba90b.rlib --extern rustc_serialize=/home/swiesend/workspace/rust/RustNN/target/debug/deps/librustc_serialize-9ef26f158d5284e0.rlib --extern rand=/home/swiesend/workspace/rust/RustNN/target/debug/deps/librand-b924d9fc5b3eb5b8.rlib -L native=/home/swiesend/workspace/rust/RustNN/target/debug/build/time-e758cbe877e9589d/out`
src/lib.rs:70:18: 70:28 error: unresolved import `threadpool::ScopedPool`. There is no `ScopedPool` in `threadpool`
src/lib.rs:70 use threadpool::{ScopedPool};
                               ^~~~~~~~~~
error: aborting due to previous error
Could not compile `nn`.

Hey Jack,

I'm very new to rust and still don't know how to attack build issues. Can you help me out with that one? I don't understand well why its not working, although the ScopedPool seems to be implemented in the threadpool lib as pub struct ScopedPool<'pool> : https://github.com/rust-lang/threadpool/blob/master/src/lib.rs

rustc --version
rustc 1.0.0-beta.4 (850151a75 2015-04-30) (built 2015-04-30)

Index out of bounds error with more than three layers

Hi,

When I change the layer of xor test NN from &[2,3,1] to &[2,3,3,1] , it panics at this line with the following trace:

thread '<unnamed>' panicked at 'index out of bounds: the len is 1 but the index is 1', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcollections/vec.rs:1338
stack backtrace:
   1:     0x7f238e58c7e9 - sys::backtrace::write::ha14749a03a5342e69AD
   2:     0x7f238e5905e6 - panicking::on_panic::hee4fd6319a5ce222fRJ
   3:     0x7f238e57a3f3 - rt::unwind::begin_unwind_inner::h7cec0e68cf4dd4e9WwJ
   4:     0x7f238e57a7df - rt::unwind::begin_unwind_fmt::h9b999773388b3dfaxvJ
   5:     0x7f238e58ffa7 - rust_begin_unwind
   6:     0x7f238e5bd0a4 - panicking::panic_fmt::h518b890fb69ee41c9qB
   7:     0x7f238e5bec9c - panicking::panic_bounds_check::hfe3fd03998902d4dfqB
   8:     0x7f238e4d8066 - vec::Vec<T>.Index<usize>::index::h10533351574849293586
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcollections/vec.rs:1338
   9:     0x7f238e4aff8e - NN::calculate_weight_updates::h496ec902d44cfbc4AOa
                        at src/lib.rs:538
  10:     0x7f238e4cf655 - NN::train_batch::closure.5782
                        at src/lib.rs:450
  11:     0x7f238e4cf33d - F.FnBox::call_box::h16158016883286431322
                        at /home/guersam/.cargo/registry/src/github.com-1ecc6299db9ec823/threadpool-0.1.2/src/lib.rs:26
  12:     0x7f238e546fee - spawn_scoped_in_pool::closure.3431
                        at /home/guersam/.cargo/registry/src/github.com-1ecc6299db9ec823/threadpool-0.1.2/src/lib.rs:225
  13:     0x7f238e546de6 - thunk::Thunk<'a, (), R>::new::closure.3426
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thunk.rs:27
  14:     0x7f238e546d41 - thunk::F.Invoke<A, R>::invoke::h3097253234199166430
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thunk.rs:54
  15:     0x7f238e53d6a7 - thunk::Thunk<'a, A, R>::invoke::h13280486025064970643
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thunk.rs:41
  16:     0x7f238e53cd63 - thread::Builder::spawn_inner::closure.3133
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thread/mod.rs:354
  17:     0x7f238e53ccee - rt::unwind::try::try_fn::__rust_abi::h7868465900712247904
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/rt/unwind.rs:139
  18:     0x7f238e53cc89 - rt::unwind::try::try_fn::h7868465900712247904
  19:     0x7f238e594818 - rust_try_inner
  20:     0x7f238e594805 - rust_try
  21:     0x7f238e53c07a - rt::unwind::try::h18352464926673870406
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/rt/unwind.rs:125
  22:     0x7f238e53bcb7 - thread::Builder::spawn_inner::closure.3000
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thread/mod.rs:354
  23:     0x7f238e53dca4 - thunk::Thunk<'a, (), R>::new::closure.3155
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thunk.rs:27
  24:     0x7f238e53dbdc - thunk::F.Invoke<A, R>::invoke::h13792676425105660100
                        at /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/thunk.rs:54
  25:     0x7f238e58f2c1 - sys::thread::create::thread_start::h5bfe55b0d48e24ddIqI
  26:     0x7f238d5580a4 - start_thread
  27:     0x7f238dd71cfc - __clone
  28:                0x0 - <unknown>

Relicense under dual MIT/Apache-2.0

This issue was automatically generated. Feel free to close without ceremony if
you do not agree with re-licensing or if it is not possible for other reasons.
Respond to @cmr with any questions or concerns, or pop over to
#rust-offtopic on IRC to discuss.

You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0" and
the repository field pointing here.

TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be nice
for GPLv2 projects to use your code.

Why?

The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library in
use. The Apache license does not have this drawback. However, this is not the
primary motivation for me creating these issues. The Apache license also has
protections from patent trolls and an explicit contribution licensing clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project.

Some ask, "Does this really apply to binary redistributions? Does MIT really
require reproducing the whole thing?" I'm not a lawyer, and I can't give legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it
.
But, again, the copyright notice redistribution is not the primary motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.

How?

To do this, get explicit approval from each contributor of copyrightable work
(as not all contributions qualify for copyright, due to not being a "creative
work", e.g. a typo fix) and then add the following to your README:

## License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

and in your license headers, if you have them, use the following boilerplate
(based on that used in Rust):

// Copyright 2016 RustNN Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

It's commonly asked whether license headers are required. I'm not comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.

Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust repo for a plain-text
version.

And don't forget to update the license metadata in your Cargo.toml to:

license = "MIT OR Apache-2.0"

I'll be going through projects which agree to be relicensed and have approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!

Contributor checkoff

To agree to relicensing, comment with :

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

Or, if you're a contributor, you can check the box in this repo next to your
name. My scripts will pick this exact phrase up and check your checkbox, but
I'll come through and manually review this issue later as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.