Git Product home page Git Product logo

Comments (10)

seth814 avatar seth814 commented on May 30, 2024

Can you provide OS, full traceback, and maybe the shape of the data coming out of the generator. Something like:

for X, Y in tg:
    print(X.shape, Y.shape)

Also what is your sample_rate and delta_time from the argument parser?

from audio-classification.

saadhaxxan avatar saadhaxxan commented on May 30, 2024

X.shape=(32, 1, 16000)
Y.shape=(32, 2)
sample_rate =16000
deltatime = 1.0

from audio-classification.

seth814 avatar seth814 commented on May 30, 2024

I'm not sure. The error suggests that the last dim in input_shape is wrong. What about printing the model.summary()? From the model object in line 89. Assuming it is able to compile.

from audio-classification.

saadhaxxan avatar saadhaxxan commented on May 30, 2024

Compiling is good and done correctly in model summary the input shape is (None,1,16000) but when I run train.py it gives the error.

from audio-classification.

seth814 avatar seth814 commented on May 30, 2024

Only thing I can think of would be to post the full trace back of the error, so I can see what lines this happens from at each package.

from audio-classification.

saadhaxxan avatar saadhaxxan commented on May 30, 2024

Epoch 1/50
1/16 [>.............................] - ETA: 1sWARNING:tensorflow:Can save best model only with val_loss available, skipping.
Traceback (most recent call last):
File "train.py", line 116, in
train(args)
File "train.py", line 98, in train
callbacks=[csv_logger, cp])
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 324, in fit
total_epochs=epochs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 123, in run_one_epoch
batch_outs = execution_function(iterator)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 86, in execution_function
distributed_function(input_fn))
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\def_function.py", line 457, in call
result = self._call(*args, **kwds)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\def_function.py", line 503, in _call
self._initialize(args, kwds, add_initializers_to=initializer_map)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\def_function.py", line 408, in _initialize
*args, **kwds))
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\function.py", line 1848, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\function.py", line 2150, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\function.py", line 2041, in _create_graph_function
capture_by_value=self._capture_by_value),
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\framework\func_graph.py", line 915, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\eager\def_function.py", line 358, in wrapped_fn
return weak_wrapped_fn().wrapped(*args, **kwds)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 73, in distributed_function
per_replica_function, args=(model, x, y, sample_weights))
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 760, in experimental_run_v2
return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 1787, in call_for_each_replica
return self._call_for_each_replica(fn, args, kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 2132, in _call_for_each_replica
return fn(*args, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\autograph\impl\api.py", line 292, in wrapper
return func(*args, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 264, in train_on_batch
output_loss_metrics=model._output_loss_metrics)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 311, in train_on_batch
output_loss_metrics=output_loss_metrics))
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 252, in _process_single_batch
training=training))
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 127, in _model_loss
outs = model(inputs, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 847, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\network.py", line 708, in call
convert_kwargs_to_constants=base_layer_utils.call_context().saving)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\network.py", line 860, in _run_internal_graph
output_tensors = layer(computed_tensors, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 847, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\layers\wrappers.py", line 256, in call
output_shape = self.compute_output_shape(input_shape).as_list()
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\layers\wrappers.py", line 210, in compute_output_shape
child_output_shape = self.layer.compute_output_shape(child_input_shape)
File "C:\Users\STAR\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\keras\layers\core.py", line 1069, in compute_output_shape
% input_shape)
ValueError: The innermost dimension of input_shape must be defined, but saw: (None, None)

from audio-classification.

seth814 avatar seth814 commented on May 30, 2024

tensorflow version?

I haven't been able to re-create on ubuntu. Will start a windows machine.

from audio-classification.

saadhaxxan avatar saadhaxxan commented on May 30, 2024

tensorflow 2.0.0 both conv models work fine and train good but the problem is just with the Lstm

from audio-classification.

seth814 avatar seth814 commented on May 30, 2024

try pip install tensorflow==2.1

from audio-classification.

saadhaxxan avatar saadhaxxan commented on May 30, 2024

okk fine now its working

from audio-classification.

Related Issues (20)

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.