thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error(SubgraphInsufficientInputsForOutputs(["prediction_loss_gradient"]), State { next_error: None, backtrace: Some(stack backtrace:
0: 0x55d11fc81d54 - backtrace::backtrace::libunwind::trace
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.4/src/backtrace/libunwind.rs:53
- backtrace::backtrace::trace<closure>
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.4/src/backtrace/mod.rs:42
1: 0x55d11fc7bc2c - backtrace::capture::{{impl}}::new_unresolved
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.4/src/capture.rs:88
2: 0x55d11fc7bb7e - backtrace::capture::{{impl}}::new
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.4/src/capture.rs:63
3: 0x55d11fc79406 - error_chain::make_backtrace
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/error-chain-0.11.0/src/lib.rs:616
4: 0x55d11fc7946f - error_chain::{{impl}}::default
at /home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/error-chain-0.11.0/src/lib.rs:710
5: 0x55d11fc2ab91 - alumina::graph::{{impl}}::from_kind
at /home/g/Desktop/learned-index/<impl_error_chain_processed macros>:53
6: 0x55d11fc2ae7c - alumina::graph::{{impl}}::from
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/graph.rs:16
7: 0x55d11fc131fc - core::convert::{{impl}}::into<alumina::graph::ErrorKind,alumina::graph::Error>
at /checkout/src/libcore/convert.rs:415
8: 0x55d11fc233a7 - alumina::graph::find_pass_order
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/graph.rs:1059
9: 0x55d11fc1faad - alumina::graph::{{impl}}::new
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/graph.rs:730
10: 0x55d11fc1693b - alumina::graph::{{impl}}::subgraph
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/graph.rs:194
11: 0x55d11fc16d73 - alumina::graph::{{impl}}::default_subgraph
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/graph.rs:210
12: 0x55d11fb08dd2 - alumina::opt::adam::{{impl}}::new
at /home/g/.cargo/git/checkouts/alumina-6fbb489aa505e418/7c1b79e/src/opt/adam.rs:38
13: 0x55d11fa307bc - learned_index::nn::learn_test
at src/lib/nn.rs:40
14: 0x55d11fa1f4d6 - learned_btree::main
at src/bin/btree/main.rs:13
15: 0x55d11fd349ce - panic_unwind::__rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:101
16: 0x55d11fd20a73 - std::panic::catch_unwind<closure,()>
at /checkout/src/libstd/panicking.rs:459
- std::rt::lang_start
at /checkout/src/libstd/rt.rs:58
17: 0x55d11fa1f51d - main
18: 0x7f8ee148382f - __libc_start_main
19: 0x55d11fa1be68 - _start
20: 0x0 - <unknown>) })', /checkout/src/libcore/result.rs:916:4
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at /checkout/src/libstd/sys_common/backtrace.rs:68
at /checkout/src/libstd/sys_common/backtrace.rs:57
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/panicking.rs:381
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:397
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:577
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:538
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:522
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:498
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:71
9: core::result::unwrap_failed
at /checkout/src/libcore/macros.rs:23
10: <core::result::Result<T, E>>::unwrap
at /checkout/src/libcore/result.rs:782
11: learned_btree::main
at src/bin/btree/main.rs:13
12: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:101
13: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:459
at /checkout/src/libstd/rt.rs:58
14: main
15: __libc_start_main
16: _start
I am testing out this framework. So currently I am modifying the MNIST example, changing the loss function to MSE and getting the error above.
/// A common mnist network with two hidden layers of 800 units and tanh activation functions
#[allow(unused)]
fn mnist_tanh_800(regularise: f32) -> Result<GraphDef> {
let mut g = GraphDef::new();
let input = g.new_node(shape![Unknown, 1], "input", tag![])?;
let labels = g.new_node(shape![Unknown, 1], "labels", tag![])?;
let layer1 = g.new_node(shape![Unknown, 10], "layer1", tag![])?;
let layer1_activ = g.new_node(shape![Unknown, 10], "layer1_activ", tag![])?;
let layer2 = g.new_node(shape![Unknown, 10], "layer2", tag![])?;
let layer2_activ = g.new_node(shape![Unknown, 10], "layer2_activ", tag![])?;
let prediction = g.new_node(shape![Unknown, 1], "prediction", tag![])?;
let softmax = g.new_node(shape![Unknown, 1], "softmax", tag![])?;
let prediction_loss = g.new_node(shape![Unknown], "prediction_loss", tag![])?;
g.new_op(Linear::new(&input, &layer1).init(Linear::msra(1.0)), tag![])?;
g.new_op(Bias::new(&layer1), tag![])?;
g.new_op(Tanh::new(&layer1, &layer1_activ), tag![])?;
g.new_op(Linear::new(&layer1_activ, &layer2).init(Linear::msra(1.0)), tag![])?;
g.new_op(Bias::new(&layer2), tag![])?;
g.new_op(Tanh::new(&layer2, &layer2_activ), tag![])?;
g.new_op(Linear::new(&layer2_activ, &prediction).init(Linear::msra(1.0)), tag![])?;
g.new_op(Softmax::new(&prediction, &softmax), tag![])?;
g.new_op(CrossEntropy::new(&softmax, &labels), tag![])?;
g.new_op(Mse::new(&prediction, &labels).output(&prediction_loss), tag![])?;
Ok(g)
}