GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — make rnnrbm work with float32. · imclab/DeepLearningTutorials@8b7c187

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • code
    • rnnrbm.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/rnnrbm.py‎

Copy file name to clipboardExpand all lines: code/rnnrbm.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ def train(self, files, batch_size=100, num_epochs=200):
218218

219219
assert len(files) > 0, 'Training set is empty!' \
220220
' (did you download the data files?)'
221-
dataset = [midiread(f, self.r, self.dt).piano_roll for f in files]
221+
dataset = [midiread(f, self.r,
222+
self.dt).piano_roll.astype(theano.config.floatX)
223+
for f in files]
224+
222225
try:
223226
for epoch in xrange(num_epochs):
224227
numpy.random.shuffle(dataset)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.