BookmarkSubscribeRSS Feed
Michal_S_00
Calcite | Level 5

Hi,

I'm working at Sequnce Labaling model for NLP task (dlpy.applications.SequenceLabeling) and while I was trying to fit the data, I came across an error "ERROR: A floating-point overflow exception occurred, halting the analysis. This condition is usually caused by improperly scaled inputs, a large learning rate, or exploding gradients.".

 

This is my code:

model.fit(data='train_data',
                 inputs=col_names[:10],
                 texts=col_names[:10],
                 target_sequence=col_names[10:],
                 nominals=col_names[10:],
                 text_parms=TextParms(init_input_embeddings='word_embeddings_100'),
                 mini_batch_size=10,
                 max_epochs=100,
                 lr=0.000000000000001,
                 log_level=2
                 )
 
Input consists of ten columns, there is one word in each column in each row, also the labels(varchar type) are represented in the same way.
 
I tried to run it with diffrent learning rate, but every time I get the same error, any ideas how to fix that?
2 REPLIES 2
joeFurbee
Community Manager

Hi @Michal_S_00,

This question is being worked on by the developer through the issue created on the DLPy GitHub repository. I will update this thread once a solution is posted there.


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

joeFurbee
Community Manager

Here's a copy of the response from @lipcai on GitHub:

 

If your model generates floating-point exception errors, you can consider specifying values for gradient clipping parameters (clip_grad_min and clip_grad_max). https://github.com/sassoftware/python-dlpy/blob/af4874e00edc7a4b7c31646e76057a76d566481c/dlpy/tests/...


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 755 views
  • 1 like
  • 2 in conversation