You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.g. you might require your raw data to be of format [(Input1, input2, …), (output1, output2, …)] (2 levels of lists/tuples/dict), but ArtificialFederatedDataset.from_slices can only handle 1 level of nested tuples.
This does not work:
import numpy as np
from pfl.data.federated_dataset import ArtificialFederatedDataset
x = np.zeros(6,1)
fd = ArtificialFederatedDataset.from_slices(
data=[(x.copy(), x.copy()), x.copy()],
data_sampler=lambda length: np.random.choice(len(x), length),
sample_dataset_len=lambda: 2)
d = next(fd)
expected return dataset d with d.raw_data shape
[((2,1),(2,1)), (2,1)]
The text was updated successfully, but these errors were encountered:
e.g. you might require your raw data to be of format
[(Input1, input2, …), (output1, output2, …)]
(2 levels of lists/tuples/dict), but ArtificialFederatedDataset.from_slices can only handle 1 level of nested tuples.This does not work:
expected return dataset d with
d.raw_data
shapeThe text was updated successfully, but these errors were encountered: