Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some questions about the net.prototxt #17

Open
zkself opened this issue Mar 6, 2019 · 6 comments
Open

some questions about the net.prototxt #17

zkself opened this issue Mar 6, 2019 · 6 comments

Comments

@zkself
Copy link

zkself commented Mar 6, 2019

hello ! i'am very appreciate your nice work!

i have some question about your net.prototxt.
First,
layer {
name: "embedding"
type: "Embed"
bottom: "input"
top: "embedding"
param {
name: "embed_param"
}
propagate_down: false
embed_param {
num_output: 1000
input_dim: 10010
bias_term: false
weight_filler {
type: "gaussian"
std: 0.00999999977648
}
}
}

why
propagate_down: false?
is that means the embedding layer is pretrained? but,i have not found the clue in your code.

@peteanderson80
Copy link
Owner

peteanderson80 commented Mar 6, 2019

The propagate_down flag affects the inputs to this layer, it does not stop this layer from learning: https://github.com/BVLC/caffe/blob/04ab089db018a292ae48d51732dd6c66766b36b6/src/caffe/proto/caffe.proto#L347-L354
The embedding layer is not pretrained and the propagate_down flag is not actually necessary here. I think it is left over from some experiments I was doing that involved backpropagating through beam search or something.

@zkself
Copy link
Author

zkself commented Mar 6, 2019 via email

@zkself
Copy link
Author

zkself commented Mar 11, 2019

@peteanderson80
i have encountered another problem when i run the train.sh. the error output is listed blew:

HDF5-DIAG: Error detected in HDF5 (1.8.16) thread 139667420518144:
#000: ../../../src/H5G.c line 467 in H5Gopen2(): unable to open group
major: Symbol table
minor: Can't open object
#1: ../../../src/H5Gint.c line 320 in H5G__open_name(): group not found
major: Symbol table
minor: Object not found
#2: ../../../src/H5Gloc.c line 430 in H5G_loc_find(): can't find object
major: Symbol table
minor: Object not found
#3: ../../../src/H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed
major: Symbol table
minor: Object not found
#4: ../../../src/H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator failed
major: Symbol table
minor: Callback failed
#5: ../../../src/H5Gloc.c line 385 in H5G_loc_find_cb(): object 'data' doesn't exist
major: Symbol table
minor: Object not found
F0311 21:32:04.921723 33935 net.cpp:793] Check failed: data_hid >= 0 (-1 vs. 0) Error reading weights from snapshots/caption_lstm/lstm_scst_iter_1000.caffemodel.h5
*** Check failure stack trace: ***
@ 0x7f06736175cd google::LogMessage::Fail()
@ 0x7f0673619433 google::LogMessage::SendToLog()
@ 0x7f067361715b google::LogMessage::Flush()
@ 0x7f0673619e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f0673bb0848 caffe::Net<>::CopyTrainedLayersFromHDF5()
@ 0x7f0673bb4d04 caffe::Net<>::CopyTrainedLayersFrom()
@ 0x7f067430ee8c caffe::Net_Init_Load()
@ 0x7f0674329a43 boost::python::objects::signature_py_function_impl<>::operator()()
@ 0x7f0672d935cd boost::python::objects::function::call()
@ 0x7f0672d937c8 (unknown)
@ 0x7f0672d9b613 boost::python::handle_exception_impl()
@ 0x7f0672d90999 (unknown)
@ 0x7f06db017973 (unknown)
@ 0x7f06db02680d (unknown)
@ 0x7f06db017973 (unknown)
@ 0x7f06db070764 _PyExc_Init
@ 0x7f06db06d01b method_get
@ 0x7f06db017973 (unknown)
@ 0x7f06db0add49 PyType_Ready
@ 0x7f06db0b217e slot_nb_xor
@ 0x7f06db0b36c9 type_setattro
@ 0x7f06db0b38ea type_new
@ 0x7f06db0ccbad _PyUnicodeUCS4_ToNumeric
@ 0x7f06db0cdd28 _PyUnicodeUCS4_ToNumeric
@ 0x7f06db0cef48 warn_explicit
@ 0x7f06db0e116c ast_for_exprlist.isra.16
@ 0x7f06da277830 libc_start_main
@ 0x55d114aac07f (unknown)
./experiments/caption_lstm/train.sh: line 27: 33935 Aborted (core dumped) python ./scripts/beam_decode.py --gpu ${GPU_ID:0:1} --model ${BASE_DIR}${NET_NAME}/decoder.prototxt --weights=${SNAPSHOT_DIR}${NET_NAME}/lstm_scst_iter
${SCST_MAX_IT}.caffemodel.h5 --vocab ${DATA_DIR}${VOCAB_FILE} --outfile ${OUT_DIR}/${NET_NAME}/scst_iter
${SCST_MAX_IT}.json

@GaoYifanGHB
Copy link

Check failed: data_hid >= 0 (-1 vs. 0) Error reading weights from snapshots/caption_lstm/lstm_scst_iter_1000.caffemodel.h5

I have the same problem, have you solved it? @zkself

@wonderseen
Copy link

@GaoYifanGHB Hi, Gao.
I got a broken connection to the published model lstm_scst_iter_1000.caffemodel.h5 (listed in author's code). Could you please share the way how you get the model :)?
Thank you.

@YoussefSaadYoussef
Copy link

I have the same problem
Check failed: data_hid >= 0 (-1 vs. 0) Error reading weights from snapshots/caption_lstm/lstm_scst_iter_1000.caffemodel.h5

did you solve it? @GaoYifanGHB @zkself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants