This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var powerSets = new Array(); | |
powerSets.push("Z"); | |
var statesInString = states.join(''); | |
statesInString = statesInString.substring(0, numLines); //take the NFA string only | |
string_recursive(powerSets,"",statesInString); | |
alert(powerSets[0]); | |
// for(i = 0; i<powerSetNumber ; i++){ | |
// alert(powerSets[i]); | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def text_encoding(vocab_len, original_text, nt, nz,cap_length, batch_size): | |
# initialization of pytorch functions | |
# Word embedding here | |
text_embedding = nn.Embedding(batch_size * cap_length + 1, nt).cuda() | |
# RNN layers | |
rnn = nn.LSTM(cap_length + 1, 256, batch_size).cuda() | |
# FC layer |