Problem with bad_alloc error
ailstm opened this issue · comments
Hello,
before training my own datasets I first wanted to check the training on the toy example and I am running into difficulties.
I first formed the TensorStream from data with the command:
sudo ./makeCompressedTensorStream mypath/cn24/example/toy/toy.set mypath/cn24/example/toy/images mypath/cn24/example/toy mypath/cn24/example/toy/labels mypath/cn24/example/toy DATASET_TRAIN.CTensor false
the contents of my dataset_config.set is:
training=DATASET_TRAIN.CTensor
when I next run the command:
sudo ./trainNetwork dataset_config.set toy01.net
I get the following error:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Note that I get a similar error if I want to inspect tensor with TensorTool, if I run command "sudo ./tensorTool DATASET_TRAIN.CTensor":
" terminate called after throwing an instance of 'std::bad_alloc'"
I have also noticed I do not get errors above if I build the tensorstream with makeTensorStream command instead of the makeCompressedTensorstream command. If I run TensorTool on such TensorStream I get the following output:
INF [ main(56) ] Tensor: (1s@14x7x1m)
INF [ main(57) ] Enter "help" for information on how to use this program
However if I run the above command trainNetwork on tensorstream formed with makeTensorStream I get a different error:
INF [ main(104) ] Using hybrid patchwise training
INF [ main(111) ] Loading dataset, this can take a long time depending on the size!
INF [ TensorStreamPatchDataset::TensorStreamPatchDataset(119) ] Deserializing 1 Tensors...
.
ERR [ SimpleLayer::Connect(37) ] Nodes failed validation and did not connect!
ERR [ NetGraph::InitializeNode(285) ] FATAL: Layer will not connect: Convolutional Layer (0 kernels @ 1x1)
terminate called after throwing an instance of 'std::runtime_error'
what(): See log for details.
Could you please help me with the problem? What could be the reasons?
Thanks!
Problem is resolved. I forgot a few lines in set file.
Great! Could you tell us which lines were missing so we can add an appropriate error message?