-
Notifications
You must be signed in to change notification settings - Fork 12
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
arg_scope #3
Comments
Did you fix it ? |
Please check the implementation of https://github.com/tensorflow/models/blob/c92a7e169f03c8672a21e6c2172bc8e5d174115b/research/object_detection/builders/hyperparams_builder.py#L178. The hyperparameter_builder.build() function now returns a function. However, for the previous OBJECT_DETECTION version, the build function returns a list/tuple (I cannot remember clearly). Please refer https://github.com/tensorflow/models/blob/c92a7e169f03c8672a21e6c2172bc8e5d174115b/research/object_detection/predictors/convolutional_box_predictor.py#L145 to use. That is, call the returned function. |
Please let me know if the solution works. |
Please see my suggestions. |
When my code changed to this, `if not isinstance(config, utils_pb2.FCEncoder): hp = hyperparams_builder.build(config.fc_hyperparams, is_training=is_training) node = features it didn't report the previous error, but a new error occurred.
|
Your vocabulary size is wrong.
On Sat, Aug 3, 2019 at 6:46 AM Pg-Man ***@***.***> wrote:
When my code changed to this,
`if not isinstance(config, utils_pb2.FCEncoder):
raise ValueError('The config has to be an instance of FCEncoder.')
hp = hyperparams_builder.build(config.fc_hyperparams,
is_training=is_training)
node = features
node = slim.dropout(node, config.input_dropout_keep_prob,
is_training=is_training)
with slim.arg_scope(hp()):
node = slim.fully_connected(node, config.num_outputs,
scope=config.scope, reuse=reuse)
node = slim.dropout(node, config.output_dropout_keep_prob,
is_training=is_training)`
it didn't report the previous error, but a new error occurred.
File "train/eval.py", line 266, in <module> app.run() File
"/home/ypj/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py",
line 125, in run _sys.exit(main(argv)) File "train/eval.py", line 179, in
main predictions = model.build_evaluation_graph(examples) File
"/home/ypj/文档/ADVISE/ADVISE/models/vse_model.py", line 120, in
build_evaluation_graph statement_strings_reshaped,
statement_lengths_reshaped) File
"/home/ypj/文档/ADVISE/ADVISE/text_encoders/bow_encoder.py", line 110, in
encode self._set_init_fn(embedding_weights,
model_proto.init_emb_matrix_path) File
"/home/ypj/文档/ADVISE/ADVISE/text_encoders/bow_encoder.py", line 46, in
_set_init_fn embedding_weights.op.name: word2vec} ) File
"/home/ypj/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py",
line 508, in assign_from_values feed_dict[placeholder_value] =
var_value.reshape(var.get_shape()) ValueError: cannot reshape array of size
5066200 into shape (25333,200)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AA6CPAIVYIK7GOLWN6BKQ33QCUER7A5CNFSM4ICTNBH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PG7KY#issuecomment-517894059>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6CPAPHJ5SFGJNT3FWG3G3QCUER7ANCNFSM4ICTNBHQ>
.
--
Thanks, best regards.
Keren
|
Dear Sir, In fact, In fact, I also found the problem of vocabulary size because 25333*200 =5066600>5066200. Since I am learning the way to image recognition, it is difficult to find out which file to change the relevant code in. After I cloned your code from github, I didn't change them, so I don't know why there was this error. Sincerely like you for help, please tell me which file to modify and how to modify it. Forgive me for your harassment. Thanks,best regards. PG-Man |
You could modify
https://github.com/yekeren/ADVISE-Image_ads_understanding/blob/2ea5e1405b1ab178b95f9c2cd9158b16847ac6a3/configs/advise.baseline.pbtxt#L110
based on your generated files in the output directory.
…On Sun, Aug 4, 2019 at 3:07 PM Pg-Man ***@***.***> wrote:
Your vocabulary size is wrong.
On Sat, Aug 3, 2019 at 6:46 AM Pg-Man *@*.***> wrote: When my code
changed to this, if not isinstance(config, utils_pb2.FCEncoder): raise
ValueError('The config has to be an instance of FCEncoder.') hp =
hyperparams_builder.build(config.fc_hyperparams, is_training=is_training)
node = features node = slim.dropout(node, config.input_dropout_keep_prob,
is_training=is_training) with slim.arg_scope(hp()): node =
slim.fully_connected(node, config.num_outputs, scope=config.scope,
reuse=reuse) node = slim.dropout(node, config.output_dropout_keep_prob,
is_training=is_training) it didn't report the previous error, but a new
error occurred. File "train/eval.py", line 266, in app.run() File
"/home/ypj/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py",
line 125, in run _sys.exit(main(argv)) File "train/eval.py", line 179, in
main predictions = model.build_evaluation_graph(examples) File
"/home/ypj/文档/ADVISE/ADVISE/models/vse_model.py", line 120, in
build_evaluation_graph statement_strings_reshaped,
statement_lengths_reshaped) File
"/home/ypj/文档/ADVISE/ADVISE/text_encoders/bow_encoder.py", line 110, in
encode self._set_init_fn(embedding_weights,
model_proto.init_emb_matrix_path) File
"/home/ypj/文档/ADVISE/ADVISE/text_encoders/bow_encoder.py", line 46, in
_set_init_fn embedding_weights.op.name: word2vec} ) File
"/home/ypj/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py",
line 508, in assign_from_values feed_dict[placeholder_value] =
var_value.reshape(var.get_shape()) ValueError: cannot reshape array of size
5066200 into shape (25333,200) — You are receiving this because you
commented. Reply to this email directly, view it on GitHub <#3
<#3>?email_source=notifications&email_token=AA6CPAIVYIK7GOLWN6BKQ33QCUER7A5CNFSM4ICTNBH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PG7KY#issuecomment-517894059>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA6CPAPHJ5SFGJNT3FWG3G3QCUER7ANCNFSM4ICTNBHQ
.
-- Thanks, best regards. Keren
Dear Sir,
I am very happy to hear from you that I am vocabulary size set incorrectly.
In fact, In fact, I also found the problem of vocabulary size because
25333*200 =5066600>5066200. Since I am learning the way to image
recognition, it is difficult to find out which file to change the relevant
code in. After I cloned your code from github, I didn't change them, so I
don't know why there was this error. Sincerely like you for help, please
tell me which file to modify and how to modify it. Forgive me for your
harassment.
Thanks,best regards.
PG-Man
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AA6CPAILSLAPZYQFC4ZDAV3QC3IB3A5CNFSM4ICTNBH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QBO5Q#issuecomment-518002550>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6CPAOZNPVZV2FF2XNGVFDQC3IB3ANCNFSM4ICTNBHQ>
.
--
Thanks, best regards.
Keren
|
I ran into an error when executing "sh train.sh" for a toy model. Before this step, I generated all the features. Any idea on debugging this?
The text was updated successfully, but these errors were encountered: