File "", line 1, in
runfile('/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification/model.py', wdir='/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification')
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification/model.py", line 79, in
test()
File "/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification/model.py", line 62, in test
model = vggvox_model()
File "/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification/model.py", line 44, in vggvox_model
pool='max',pool_size=(3,3),pool_strides=(2,2))
File "/home/batuhan/Desktop/Python/Staj/SpeakerRecognition/vggvox-speaker-identification/model.py", line 19, in conv_bn_pool
x = BatchNormalization(epsilon=1e-5,momentum=1,name='bn{}'.format(layer_idx))(x)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 922, in call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/layers/normalization.py", line 741, in call
outputs = self._fused_batch_norm(inputs, training=training)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/layers/normalization.py", line 612, in _fused_batch_norm
lambda: 1.0)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/utils/tf_utils.py", line 65, in smart_cond
pred, true_fn=true_fn, false_fn=false_fn, name=name)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/smart_cond.py", line 59, in smart_cond
name=name)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1177, in cond
return cond_v2.cond_v2(pred, true_fn, false_fn, name)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/cond_v2.py", line 101, in cond_v2
name=scope)
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/cond_v2.py", line 221, in _build_cond
_check_same_outputs(_COND, [true_graph, false_graph])
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/cond_v2.py", line 801, in _check_same_outputs
error(b, "%s and %s have different types" % (b0_out, bn_out))
File "/home/batuhan/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/cond_v2.py", line 779, in error
detail=error_detail))
TypeError: true_fn and false_fn arguments to tf.cond must have the same number, type, and overall structure of return values.
true_fn output: Tensor("Identity:0", shape=(), dtype=int32)
false_fn output: Tensor("Identity:0", shape=(), dtype=float32)
Error details:
Tensor("Identity:0", shape=(), dtype=int32) and Tensor("Identity:0", shape=(), dtype=float32) have different types
Here is the full error. Something is wrong with batchnorm but i could not understand why.The same operations done for both true_fn and false_fn.