Code Monkey home page Code Monkey logo

phloem's People

Contributors

hobofan avatar homu avatar michaelhirn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phloem's Issues

0.3.0 doesn't build with 1.7-nightly

If I use leaf = "0.1.1" in my Cargo.toml then it pulls in phloem 0.3.0 which doesn't build on 1.7-nightly:

   Compiling phloem v0.3.0
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:24:5: 24:36 error: unresolved import `co::shared_memory::SharedMemory`. Could not find `shared_memory` in `co` [E0432]
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:24 use co::shared_memory::SharedMemory;
                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:24:5: 24:36 help: run `rustc --explain E0432` to see a detailed explanation
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29:5: 29:28 error: unresolved import `co::libraries::blas::*`. Could not find `libraries` in `co` [E0432]
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29 use co::libraries::blas::*;
                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29:5: 29:28 help: run `rustc --explain E0432` to see a detailed explanation
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:38: 30:43 error: unresolved import `co::libraries::numeric_helpers::Float`. Could not find `libraries` in `co` [E0432]
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30 use co::libraries::numeric_helpers::{Float, cast};
                                                                                                                              ^~~~~
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:38: 30:43 help: run `rustc --explain E0432` to see a detailed explanation
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:45: 30:49 error: unresolved import `co::libraries::numeric_helpers::cast`. Could not find `libraries` in `co` [E0432]
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30 use co::libraries::numeric_helpers::{Float, cast};
                                                                                                                                     ^~~~
/home/ehiggs/.cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:45: 30:49 help: run `rustc --explain E0432` to see a detailed explanation

Handle automatic Blob shape better

Currently we are porting over the behaviour of Caffe where the shape of a Blob is a Vec<isize>.
A more apropriate type would be Vec<usize> since a dimension can't have a negative size and this might yield wrong results when calculating the capacity.

The old isize is currently kept because we wan't the option of adopting Caffes behaviour for reshaping Blobs as described here:

// Specify the output dimensions. If some of the dimensions are set to 0,
// the corresponding dimension from the bottom layer is used (unchanged).
// Exactly one dimension may be set to -1, in which case its value is
// inferred from the count of the bottom blob and the remaining dimensions.

and here:

// If "input" is 2D with shape 2 x 8, then the following reshape_param
// specifications are all equivalent, producing a 3D blob "output" with shape
// 2 x 2 x 4:
//
// reshape_param { shape { dim: 2 dim: 2 dim: 4 } }
// reshape_param { shape { dim: 0 dim: 2 dim: 4 } }
// reshape_param { shape { dim: 0 dim: 2 dim: -1 } }
// reshape_param { shape { dim: -1 dim: 0 dim: 2 } }

From a quick look at Caffe I gathered that this reshaping is only used in a special ReshapeLayer, so this behaviour might be completely handeled there.

As we see it we have two options:

  • Change the shape to be a Vec<Dimension> where Dimension is a enum covering all special behaviour. This will make creating shapes much uglier for most simple use cases: vec![Some(3), Some(2)]
  • Change the shape to be a Vec<usize>, and handeling the reshaping differently. This will probably make the reshaping process more complicated.

I am strongly in favor of the latter option.

Can't compile on 1.5

Looks like this doesn't compile with 1.5, is nightly a requirement, if so, which version, as the latest nightly also fails to build it.

1.5.0

  Compiling phloem v0.3.0
/home/tburdick/.multirust/toolchains/1.5.0/cargo/registry/src/github.com-0a35038f75765ae4/phloem-0.3.0/src/lib.rs:20:1: 20:30 error: #[feature] may not be used on the stable release channel
/home/tburdick/.multirust/toolchains/1.5.0/cargo/registry/src/github.com-0a35038f75765ae4/phloem-0.3.0/src/lib.rs:20 #![feature(clone_from_slice)]
                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nightly

/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29:5: 29:28 error: unresolved import `co::libraries::blas::*`. Could not find `libraries` in `co` [E0432]
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29 use co::libraries::blas::*;
                                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:29:5: 29:28 help: run `rustc --explain E0432` to see a detailed explanation
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:38: 30:43 error: unresolved import `co::libraries::numeric_helpers::Float`. Could not find `libraries` in `co` [E0432]
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30 use co::libraries::numeric_helpers::{Float, cast};
                                                                                                                                                             ^~~~~
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:38: 30:43 help: run `rustc --explain E0432` to see a detailed explanation
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:45: 30:49 error: unresolved import `co::libraries::numeric_helpers::cast`. Could not find `libraries` in `co` [E0432]
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30 use co::libraries::numeric_helpers::{Float, cast};
                                                                                                                                                                    ^~~~
/home/tburdick/.multirust/toolchains/nightly/cargo/registry/src/github.com-88ac128001ac3a9a/phloem-0.3.0/src/blob.rs:30:45: 30:49 help: run `rustc --explain E0432` to see a detailed explanation
error: aborting due to 3 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `phloem`.

To learn more, run the command again with --verbose.

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.