Skip to content

AttributeError: 'Functional' object has no attribute 'initial_state_function' #2

Description

@1ronaldferdinand

I have use your library to my text summarize model, and i got error like the error message bellow.
I just make different thing in the token, where i turn <UNK> to unk, <s> to sostok, and </s> to eostok, to follow my vocab dictionary.

AttributeError                            Traceback (most recent call last)
Input In [111], in <cell line: 7>()
      4 input_text = "Hello World !"
      5 X = [encoder_vocabulary.get(t, encoder_vocabulary['unk']) for t in input_text.split()]
----> 7 hypotheses = beam_search(model.initial_state_function, model.generate_function, X, decoder_vocabulary['sostok'], decoder_vocabulary['eostok'])
      9 for hypothesis in hypotheses:
     11     generated_indices = hypothesis.to_sequence_of_values()

AttributeError: 'Functional' object has no attribute 'initial_state_function'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions