UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor(“gradients/cond_grad/Identity_1:0”, shape=(None,), dtype=int64), values=Tensor(“gradients/cond_grad/Identity:0”, shape=(None,), dtype=float32), dense_shape=Tensor(“gradients/cond_grad/Identity_2:0”, shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
Please read “How to ask a great question”:
- Please explain:
- How you encountered this problem
- What you’ve already tried to solve it; any obstacles that prevented you from solving it yourself
- Minimal steps to reproduce the issue or other context (e.g. deployment method)
Can you share your config file?
Also, this is a warning, not an error. You can ignore it if everything works fine later.
I’ve also been met with this warning, it appears 4 times in training the core model (not nlu).
I’m using a docker image based on rasa/rasa:2.8.12-full.
My config file looks like this:
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: custom_components.SimpleNameExtractor
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: RulePolicy
- name: UnexpecTEDIntentPolicy
max_history: 5
epochs: 100
- name: TEDPolicy
max_history: 5
epochs: 100
constrain_similarities: true
This is pretty much the default for this version of rasa apart from the addition of the SimpleNameExtractor component.
This warning has appeared with the new tensorflow 2.6 version, not sure why and if it can cause any further issue, but you can train the same way.
2 Likes
I have the same problem. Does the problem affect the model inference speed? My inference speed is slower than other tensorflow version.