autumnai / phloem Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: use Collenchyma's SharedTensor instead
Home Page: http://autumnai.github.io/phloem
License: MIT License
DEPRECATED: use Collenchyma's SharedTensor instead
Home Page: http://autumnai.github.io/phloem
License: MIT License
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
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:
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)]
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.