Skip to content

Why not re-use session for various inputs? #9

@trollyxia

Description

@trollyxia

In generate.py, it seems that for every input, the generate() function will create a new session and do session.run():

with tf.Session(config=session_config) as sess:

I'm just wondering, will this approach incur session creation overhead every time? Why not create a session once and re-use the session as most of the other models do?

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