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

LSTM layer instead of Fully-Connected + Time Distribute #7

Open
Tabrez-dev opened this issue Apr 30, 2024 · 1 comment
Open

LSTM layer instead of Fully-Connected + Time Distribute #7

Tabrez-dev opened this issue Apr 30, 2024 · 1 comment

Comments

@Tabrez-dev
Copy link

I was trying to create this model but i ran into some errors can u have a look.

`--------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[20], line 33
     29 intent_output = Dense(n_classes, activation='softmax', name='intent_output', use_bias = False)(x)
     31 model = Model(inputs=main_input, outputs=[intent_output, slot_output])
---> 33 optim = Adam(learning_rate=1e-3, weight_decay=1e-6)
     35 model.compile(optimizer = optim, loss='categorical_crossentropy', metrics='accuracy')
     36 model.summary()

File ~/anaconda3/envs/speech-to-intent-micro/lib/python3.8/site-packages/keras/optimizers/optimizer_v2/adam.py:110, in Adam.__init__(self, learning_rate, beta_1, beta_2, epsilon, amsgrad, name, **kwargs)
    102 def __init__(self,
    103              learning_rate=0.001,
    104              beta_1=0.9,
   (...)
    108              name='Adam',
    109              **kwargs):
--> 110   super(Adam, self).__init__(name, **kwargs)
    111   self._set_hyper('learning_rate', kwargs.get('lr', learning_rate))
    112   self._set_hyper('decay', self._initial_decay)

File ~/anaconda3/envs/speech-to-intent-micro/lib/python3.8/site-packages/keras/optimizers/optimizer_v2/optimizer_v2.py:351, in OptimizerV2.__init__(self, name, gradient_aggregator, gradient_transformers, **kwargs)
    349 for k in kwargs:
    350   if k not in allowed_kwargs:
--> 351     raise TypeError("Unexpected keyword argument "
    352                     f"passed to optimizer: {str(k)}. Allowed kwargs are "
    353                     f"{allowed_kwargs}.")
    354   # checks that all keyword arguments are non-negative.
    355   if kwargs[k] is not None and kwargs[k] < 0:

TypeError: Unexpected keyword argument passed to optimizer: weight_decay. Allowed kwargs are {'decay', 'lr', 'clipvalue', 'clipnorm', 'global_clipnorm'}.
`
@Tabrez-dev
Copy link
Author

Im getting early stopping error after making it run somehow at 28 epoch is this normal?

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

1 participant