Coder Social home page Coder Social logo

bpm2's Issues

Cannot generate data and also TypeError

DataGen.py did not generate any wav files. When I manually created "wavs" directory and placed some wav file myself there and ran wavs_to_features.py, I got the following:
[root@node2 bpm]# python wavs_to_features.py
wavs/120 AClassicEducation_NightOwl_RAW_02_03.wav
120 bpm
Traceback (most recent call last):
File "wavs_to_features.py", line 45, in
X, y, bpms, fnames = ns.get_spectogram_training_set(n_batch=len(tracks_subset))
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 284, in get_spectogram_training_set
self.append_raw_wav_chunks_and_target_vectors(wav)
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 196, in append_raw_wav_chunks_and_target_vectors
rng=self.rng)
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 336, in get_target_vector
target_vec = np.random.rand(resolution) * 0.001
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand (numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample (numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array (numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an integer

NameError: global name 'history' is not defined

I got this message when I ran 'python2 fit_nn.py'. Is there something I missed to do before running it?

Traceback (most recent call last):
  File "fit_nn.py", line 102, in <module>
    history, model = fit_model(model)
  File "fit_nn.py", line 89, in fit_model
    loss = history.history['val_loss'][0]
NameError: global name 'history' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.