Lab 3 Part 2 resampling gives error
Starting epoch 1/6
AttributeError Traceback (most recent call last)
2 frames /usr/local/lib/python3.10/dist-packages/keras/engine/compile_utils.py in match_dtype_and_rank(y_t, y_p, sw) 829 def match_dtype_and_rank(y_t, y_p, sw): 830 """Match dtype and rank of predictions.""" --> 831 if y_t.shape.rank == 1 and y_p.shape.rank == 2: 832 y_t = tf.expand_dims(y_t, axis=-1) 833 if sw is not None:
AttributeError: 'tuple' object has no attribute 'rank'

Same error here. Seems like the team updated the library.
@aamini please help
Here is a messy workaround for this data type casting issue... ` for step, data in enumerate(train_loader): x,y = data xx = [tf.convert_to_tensor(a) for a in x] yy = [tf.convert_to_tensor(b) for b in y] xx = tf.convert_to_tensor(xx) yy = tf.convert_to_tensor(yy)
data = (xx,yy)
metrics = wrapper.train_step(data)`