I have made below change in conversion.py to resolve Error - "TypeError: 'float' object cannot be interpreted as an index".
ceil(spectrogram.shape[1] / gridSize) gridSize --> spectrogram.shape[1]
ceil(spectrogram.shape[0] / gridSize) gridSize --> spectrogram.shape[0]
After running, i am getting below error -
Traceback (most recent call last):
File "acapellabot.py", line 147, in
acapellabot.isolateVocals(f, args.fft, args.phase)
File "acapellabot.py", line 98, in isolateVocals
predictedSpectrogramWithBatchAndChannels = self.model.predict(expandedSpectrogramWithBatchAndChannels)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/engine/training.py", line 1169, in predict
steps=steps)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/engine/training_arrays.py", line 294, in predict_loop
batch_outs = f(ins_batch)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1388, in call
return self.function(inputs)
File "/home/sameer/.local/lib/python3.6/site-packages/theano/compile/function_module.py", line 917, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/sameer/.local/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/sameer/.local/lib/python3.6/site-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/home/sameer/.local/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else\
ValueError: all the input array dimensions except for the concatenation axis must match exactly
Apply node that caused the error: Join(TensorConstant{3}, Reshape{4}.0, Elemwise{Composite{(i0 ((i1 + i2) + Abs((i1 + i2))))}}[(0, 1)].0)
Toposort index: 207
Inputs types: [TensorType(int8, scalar), TensorType(float32, 4D), TensorType(float32, 4D)]
Inputs shapes: [(), (1, 386, 198, 128), (1, 385, 198, 64)]
Inputs strides: [(), (39131136, 101376, 512, 4), (304920, 792, 4, 304920)]
Inputs values: [array(3, dtype=int8), 'not shown', 'not shown']
Outputs clients: [[InplaceDimShuffle{0,3,1,2}(Join.0)]]
I have made below change in conversion.py to resolve Error - "TypeError: 'float' object cannot be interpreted as an index". ceil(spectrogram.shape[1] / gridSize) gridSize --> spectrogram.shape[1] ceil(spectrogram.shape[0] / gridSize) gridSize --> spectrogram.shape[0]
After running, i am getting below error -
Traceback (most recent call last): File "acapellabot.py", line 147, in
acapellabot.isolateVocals(f, args.fft, args.phase)
File "acapellabot.py", line 98, in isolateVocals
predictedSpectrogramWithBatchAndChannels = self.model.predict(expandedSpectrogramWithBatchAndChannels)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/engine/training.py", line 1169, in predict
steps=steps)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/engine/training_arrays.py", line 294, in predict_loop
batch_outs = f(ins_batch)
File "/home/sameer/.local/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1388, in call
return self.function(inputs)
File "/home/sameer/.local/lib/python3.6/site-packages/theano/compile/function_module.py", line 917, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/sameer/.local/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/sameer/.local/lib/python3.6/site-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/home/sameer/.local/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else\
ValueError: all the input array dimensions except for the concatenation axis must match exactly
Apply node that caused the error: Join(TensorConstant{3}, Reshape{4}.0, Elemwise{Composite{(i0 ((i1 + i2) + Abs((i1 + i2))))}}[(0, 1)].0)
Toposort index: 207
Inputs types: [TensorType(int8, scalar), TensorType(float32, 4D), TensorType(float32, 4D)]
Inputs shapes: [(), (1, 386, 198, 128), (1, 385, 198, 64)]
Inputs strides: [(), (39131136, 101376, 512, 4), (304920, 792, 4, 304920)]
Inputs values: [array(3, dtype=int8), 'not shown', 'not shown']
Outputs clients: [[InplaceDimShuffle{0,3,1,2}(Join.0)]]