Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

missing script in example bi-lstm-sort #2783

Closed
Bomme opened this issue Jul 20, 2016 · 5 comments
Closed

missing script in example bi-lstm-sort #2783

Bomme opened this issue Jul 20, 2016 · 5 comments

Comments

@Bomme
Copy link

Bomme commented Jul 20, 2016

The example on bidirectional LSTM misses the gen_data.py script that is referenced in the ReadMe
Maybe it did not get committed due to gitignore rules?
@xlvector do you still have the script lying around?

@dianyancao
Copy link

I have the same problem,waiting for solution.

@Ldpe2G
Copy link
Contributor

Ldpe2G commented Jul 24, 2016

I have asked xlvector before, here is the code:

import random

vocab = [str(x) for x in range(100, 1000)]

sw_train = open("sort.train.txt", "w")
sw_test = open("sort.test.txt", "w")
sw_valid = open("sort.valid.txt", "w")

for i in range(1000000):
seq = " ".join([vocab[random.randint(0, len(vocab) - 1)] for j in range(5)])
k = i % 50
if k == 0:
sw_test.write(seq + "\n")
elif k == 1:
sw_valid.write(seq + "\n")
else:
sw_train.write(seq + "\n")

sw_train.close()
sw_test.close()
sw_valid.close()

@xlvector
Copy link
Contributor

Thanks!

@diggerdu
Copy link

@Ldpe2G
THX

@phunterlau
Copy link
Contributor

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants