misterschmitz / lstm-musician Goto Github PK
View Code? Open in Web Editor NEWLSTM RNN in PyTorch to generate music inspired by actual composed pieces.
LSTM RNN in PyTorch to generate music inspired by actual composed pieces.
Please tell me how to fix it. @MisterSchmitz
RuntimeError Traceback (most recent call last)
in
4 # Training
5 for i, song_idx in enumerate(train_idxs):
----> 6 this_loss = some_pass(*song_to_seq_target(data[song_idx]))
7 loss += this_loss
8
in some_pass(seq, target, fit)
5
6 for i, c in enumerate(seq):
----> 7 output = model(c)
8 some_loss += loss_function(output, target[i])
9
F:\Ana\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
530 result = self._slow_forward(*input, **kwargs)
531 else:
--> 532 result = self.forward(*input, **kwargs)
533 for hook in self._forward_hooks.values():
534 hook_result = hook(self, input, result)
in forward(self, seq)
26
27 def forward(self, seq):
---> 28 embeds = self.embeddings(seq.view(1, -1))
29 rnn_out, self.hidden = self.rnn(embeds.view(1,1,-1), self.hidden)
30 rnn_out = self.drop(rnn_out)
F:\Ana\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
530 result = self._slow_forward(*input, **kwargs)
531 else:
--> 532 result = self.forward(*input, **kwargs)
533 for hook in self._forward_hooks.values():
534 hook_result = hook(self, input, result)
F:\Ana\lib\site-packages\torch\nn\modules\sparse.py in forward(self, input)
112 return F.embedding(
113 input, self.weight, self.padding_idx, self.max_norm,
--> 114 self.norm_type, self.scale_grad_by_freq, self.sparse)
115
116 def extra_repr(self):
F:\Ana\lib\site-packages\torch\nn\functional.py in embedding(input, weight, padding_idx, max_norm, norm_type, scale_grad_by_freq, sparse)
1482 # remove once script supports set_grad_enabled
1483 no_grad_embedding_renorm(weight, input, max_norm, norm_type)
-> 1484 return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
1485
1486
RuntimeError: Expected object of device type cuda but got device type cpu for argument #3 'index' in call to _th_index_select
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.