Code Monkey home page Code Monkey logo

baithoven's People

Contributors

mattyt03 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

baithoven's Issues

error occurred during execute rnn

I ve got error during try to run rnn.py file as

`[ValueError Traceback (most recent call last)
in
1 if name == 'main':
----> 2 train_network()

in train_network()
5 # get amount of pitch names
6 n_vocab = len(set(notes))
----> 7 network_input, network_output = prepare_sequences(notes, n_vocab)
8 model = create_network(network_input, n_vocab)
9 train(model, network_input, network_output)

in prepare_sequences(notes, n_vocab)
22 # normalize input
23 network_input = network_input / float(n_vocab)
---> 24 network_output = np_utils.to_categorical(network_output)
25 return (network_input, network_output)

~/python-envs/tfenv/lib/python3.8/site-packages/tensorflow/python/keras/utils/np_utils.py in to_categorical(y, num_classes, dtype)
73 y = y.ravel()
74 if not num_classes:
---> 75 num_classes = np.max(y) + 1
76 n = y.shape[0]
77 categorical = np.zeros((n, num_classes), dtype=dtype)

<array_function internals> in amax(*args, **kwargs)

~/python-envs/tfenv/lib/python3.8/site-packages/numpy/core/fromnumeric.py in amax(a, axis, out, keepdims, initial, where)
2665 5
2666 """
-> 2667 return _wrapreduction(a, np.maximum, 'max', axis, None, out,
2668 keepdims=keepdims, initial=initial, where=where)
2669

~/python-envs/tfenv/lib/python3.8/site-packages/numpy/core/fromnumeric.py in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
88 return reduction(axis=axis, out=out, **passkwargs)
89
---> 90 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
91
92

ValueError: zero-size array to reduction operation maximum which has no identity
]`

How do I pass over this error

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.