cvjena / cn24

Convolutional (Patch) Networks for Semantic Segmentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERR [ ErrorLayer::CreateOutputs(48) ] Inputs need the same number of elements!

zygmuntz opened this issue · comments

I get the following error when attempting to trainNetwork.

ERR [ ErrorLayer::CreateOutputs(48) ] Inputs need the same number of elements!
ERR [ NetGraph::InitializeNode(262) ] FATAL: Layer will not create outputs: Square Loss Layer (Weight: 1), input0: (4s@1536x1536x2m)

I tried a number varying things, for example architectures, but in the end it always comes down to this. Here's a fuller printout:

    (...)
DBG [ ErrorLayer::ErrorLayer(18) ] Instance created.
DBG [ NetGraph::IsComplete(119) ] Node is okay: Dataset Input Layer
DBG [ NetGraph::IsComplete(119) ] Node is okay: Resize Layer (11x11)
DBG [ NetGraph::IsComplete(119) ] Node is okay: Convolutional Layer (8 kernels @ 12x12)
DBG [ NetGraph::IsComplete(119) ] Node is okay: ReLU Layer
DBG [ NetGraph::IsComplete(119) ] Node is okay: Convolutional Layer (2 kernels @ 1x1)
DBG [ NetGraph::IsComplete(119) ] Node is okay: Sigmoid Layer
DBG [ NetGraph::IsComplete(119) ] Node is okay: Upscale Layer (4x4)
DBG [ NetGraph::IsComplete(119) ] Node is okay: Square Loss Layer (Weight: 1)
DBG [ NetGraph::IsComplete(137) ] Graph check complete.
DBG [ main(154) ] Graph complete: 1
DBG [ ConfusionMatrixLayer::ConfusionMatrixLayer(17) ] Instance created, 2 classes.
DBG [ ConvolutionLayer::Connect(135) ] Local learning rate is now 1
DBG [ ConvolutionLayer::Connect(135) ] Local learning rate is now 1
ERR [ ErrorLayer::CreateOutputs(48) ] Inputs need the same number of elements!
ERR [ NetGraph::InitializeNode(262) ] FATAL: Layer will not create outputs: Square Loss Layer (Weight: 1), input0: (4s@1536x1536x2m)
terminate called after throwing an instance of 'std::runtime_error'
  what():  See log for details.
Aborted (core dumped)

By the way, where's the log to see?

Just of the top of my head: are you sure you are correctly mapping the colors to labels? Do they both have the same number of elements in the definition.

Hi Zygmunt,
please paste the exact command line you used with makeTensorStream here and the .net and .set files you are trying to use. The direct RGB true/false argument seems to be a source of confusion and we've updated the documentation for it. In your case, it should be set to false.

That was it, I used direct RGB = true. Thank you.