Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset padding for multilabel #5

Open
Mrugankakarte opened this issue Apr 28, 2019 · 0 comments
Open

Dataset padding for multilabel #5

Mrugankakarte opened this issue Apr 28, 2019 · 0 comments

Comments

@Mrugankakarte
Copy link

Hi,

Thanks a lot for this wonderful post and code for audio classification. For multi-label I am changing

# transform the class_id into a one-hot encoded vector
response <- tf$one_hot(obs$class_id, 30L)

to

response <- as.matrix(obs[3:82])

as I have one hot encoded the labels and appended them to the dataframe. What else needs to be changed? I am getting the following error...

 Error in py_call_impl(callable, dots$args, dots$keywords) : 
  DataLossError: Attempted to pad to a smaller size than the input element.
	 [[node IteratorGetNext_4 (defined at 

padding function in data generator

ds <- ds %>% 
            dataset_padded_batch(batch_size, list(shape(n_chunks, fft_size, NULL), shape(NULL)))
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant