Code Monkey home page Code Monkey logo

soundnet_keras's Introduction

soundnet_keras's People

Contributors

pseeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

soundnet_keras's Issues

issue with short audios

the program crashes for short audio clips (less than 4 seconds). Any thoughts what could be wrong? is there any requirements on the input length?
W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at conv_ops.cc:384 : Invalid argument: computed output size would be negative [[Node: conv1d_8/convolution/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 1, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](conv1d_8/convolution/ExpandDims, conv1d_8/convolution/ExpandDims_1)]]

ValueError: Object arrays cannot be loaded when allow_pickle=False

when loading model:

Traceback (most recent call last):
  File "soundnet.py", line 104, in <module>
    prediction = predict_scene_from_audio_file('railroad_audio.wav')
  File "soundnet.py", line 88, in predict_scene_from_audio_file
    model = build_model()
  File "soundnet.py", line 26, in build_model
    model_weights = np.load('models/sound8.npy').item()

About Keras bugs[solved]

At first, thanks for wonderful work from author, I appreciate.
I got a lot of bugs when I import keras follow authors. These bugs take me 2 hours.
We aren't supposed to install Keras separately when you use tf2. Use the Keras bundled with the Tensorflow you have installed.
Finally, I solved it.
We can change soundnet.py to this:

import numpy as np
import librosa
from tensorflow.keras.layers import BatchNormalization, Activation, Conv1D, MaxPooling1D, ZeroPadding1D, InputLayer
from tensorflow.keras.models import Sequential

error loading sound8.npy

Hi,
I tried loading the pretrained model in sound8.npy and got this error. What could be the problem? python version? tensorflow version?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zahra/anaconda3/envs/tensorflow/lib/python3.6/site-packages/numpy/lib/npyio.py", line 431, in load
    "Failed to interpret file %s as a pickle" % repr(file))
OSError: Failed to interpret file 'sound8.npy' as a pickle

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.