Skip to content

Dataset do not work in 'valid' or 'test' mode #9

@Vadim2S

Description

@Vadim2S

In 'train' mode you make exactly [400,257] data frames.
In other mode you make [x,257] data frames, where x - length of mag phase spectrogramm.

    if mode=='train':
        randtime = np.random.randint(0, mag_T.shape[1]-spec_len)
        spec_mag = mag_T[:, randtime:randtime+spec_len]
    else:
        spec_mag = mag_T

In validating mode you get list of different-sized tensors and of course - error during

features = torch.from_numpy(np.asarray([torch_tensor.numpy().T for torch_tensor in sample_batched[0]])).float()

TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64

I am wonder about you train\valid approach in dataset. Can you repair project and clarify it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions