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

[Feature] optional explicit frame size for inputs #124

Open
beasteers opened this issue Sep 11, 2019 · 3 comments
Open

[Feature] optional explicit frame size for inputs #124

beasteers opened this issue Sep 11, 2019 · 3 comments

Comments

@beasteers
Copy link
Contributor

Description

Pumps should be able to set a fixed frame size for inputs

pump.layers()
# size: (None, None, 256, 1)
pump.layers(frame_duration=8)
# size: (None, time_to_frames(8), 256, 1)
pump.layers(frame_length=32)
# size: (None, 32, 256, 1)
@bmcfee
Copy link
Owner

bmcfee commented Sep 11, 2019

This seems like a bit of an anti-pattern to me. Is the use-case here for fully connected models that don't support variable-length inputs?

My hesitation for supporting that would be that the transformers can't guarantee durations of inputs, and have no built-in mechanism for trimming.

Samplers do have such a mechanism though, so maybe it's ok?

@beasteers
Copy link
Contributor Author

Yes it is. It came up in an autoencoder where I was getting None for a dense layer size, but maybe having temporally shifting features in a dense layer isn't a good idea anyways so I had a couple thoughts on how to get around it.

The general usecase would be if we're using a sampler with a fixed size (pump.sampler()) and we know the size, we could support a larger family of models which require an explicit size. Up to you if you want to support it. Or we can just promote other workarounds 🤷‍♀️

@bmcfee bmcfee reopened this Oct 8, 2019
@bmcfee
Copy link
Owner

bmcfee commented Oct 8, 2019

Sorry to lag on this, but I do think it could be a useful feature in some form. I'd like to think a bit more about the right API for it though, and probably collect a couple of example use-cases before committing to anything.

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

2 participants