Comments (10)
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.
X.shape=(32, 1, 16000)
Y.shape=(32, 2)
sample_rate =16000
deltatime = 1.0
from audio-classification.
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.
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.
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.
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.
tensorflow version?
I haven't been able to re-create on ubuntu. Will start a windows machine.
from audio-classification.
tensorflow 2.0.0 both conv models work fine and train good but the problem is just with the Lstm
from audio-classification.
try pip install tensorflow==2.1
from audio-classification.
okk fine now its working
from audio-classification.
Related Issues (20)
- train.py not accepting sample rates other than 16000 | ValueError: could not broadcast input array from shape (1,32000) into shape (1,16000) HOT 6
- jypyter run !python clean.py is None HOT 1
- train.py: IndexError: index 9 is out of bounds for axis 1 with size 9 HOT 8
- mean() instead of max() ? HOT 1
- jypyter run !python clean.py only audio file not found for sub string: 3a3d0279 is displayed #84 HOT 2
- Can you update the code with kapre3.0? HOT 2
- Model Predict Error HOT 3
- Using from google colab notebook HOT 3
- Error: Unknown Format: 3 HOT 2
- downsample_mono method results in ValueError and y variable from Pandas Series results in Exception HOT 7
- Python and Wav files - error 65534 HOT 3
- tqdm evaluation number - What does the '72' stand for? HOT 1
- Input signal length=1 is too small to resample from 44100->16000
- Clean.py memory usage
- use a.any or a.all error HOT 2
- ImportError: cannot import name 'Melspectrogram' HOT 1
- Leave one out
- The kapre package has updated and some of notebooks cannot work anymore
- Can we detect instruments list from a song? HOT 1
- What is the source of our dataset? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio-classification.