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

How long need to spend? #70

Open
HIHIHAHEI opened this issue Feb 15, 2020 · 9 comments
Open

How long need to spend? #70

HIHIHAHEI opened this issue Feb 15, 2020 · 9 comments

Comments

@HIHIHAHEI
Copy link

How long does it take to train the model

@sunilnitk
Copy link

sunilnitk commented Feb 15, 2020 via email

@HIHIHAHEI
Copy link
Author

It runs very slowly on my own computer, just like the following. Is there any way

batch: 19%|█▊ | 2094/11290 [55:29<4:13:59, 1.66s/it]

@sunilnitk
Copy link

sunilnitk commented Feb 15, 2020 via email

@HIHIHAHEI
Copy link
Author

My one is 1050ti, 4GB. I'm a student who wants to realize this function, but the cloud server is too expensive

@sunilnitk
Copy link

sunilnitk commented Feb 15, 2020 via email

@HIHIHAHEI
Copy link
Author

fine, thank u

@notebookexplore
Copy link

notebookexplore commented Mar 2, 2020

I'm running the pre-trained model in Colab using CPU (it doesn't seem faster on GPU) and for a single image it takes about 20 seconds to generate the caption and write the result to CSV. I've cached the loaded pre-trained model outside of the session block and disabled generating the image+caption, so it just needs to ingest a single image (see code below).

My implementation is based on Python 3, which I don't think should make a difference. See here: https://github.com/notebookexplore/show-attend-and-tell

Any ideas on how to speed this up or is there a more efficient way to run the pre-trained model?

model = CaptionGenerator(config)
data_dict = np.load('./pre-trained-model/289999.npy', allow_pickle=True, encoding='latin1').item()

with tf.Session() as sess:
  # testing phase
  data, vocabulary = prepare_test_data(config)
  for v in tqdm(tf.global_variables()):
        if v.name in data_dict.keys():
            sess.run(v.assign(data_dict[v.name]))
  model.test(sess, data, vocabulary)

@sunilnitk
Copy link

sunilnitk commented Mar 3, 2020 via email

@leibohan
Copy link

I am using a laboratory server with 4 2080tis and one batch is finishing in 140 minutes.
I have to hand in a report about my realizing this function recently so is there anybody who can give some advice about some substitution here for an acceptable result?
thx if anybody can give me some advice.

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

4 participants