如何在這段代碼中實現(xiàn) 10 倍交叉驗證?(train_ds, val_ds, test_ds), metadata = tfds.load( 'tf_flowers', split=['train[:60%]', 'train[60%:90%]', 'train[90%:]'], with_info=True, as_supervised=True)聚苯乙烯也許我做了 10 倍交叉驗證,但我不確定。(train_ds, test_ds), metadata = tfds.load( 'tf_flowers', split=['train[:90%]', 'train[90%:]'], with_info=True, as_supervised=True)val_ds = train_ds.split = [ f'train[{k}%:{k+10}%]' for k in range(0, 100, 10)]
1 回答

慕村9548890
TA貢獻1884條經(jīng)驗 獲得超4個贊
對我有什么幫助!
(train_ds, test_ds), metadata = tfds.load(
'tf_flowers',
split=['train[:90%]', 'train[90%:]'],
with_info=True,
as_supervised=True
)
val_ds = train_ds.split = [
f'train[{k}%:{k+10}%]' for k in range(0, 100, 10)
]
添加回答
舉報
0/150
提交
取消