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

Return correct output shape for R(2+1)D #69

Open
jsjason opened this issue Aug 28, 2019 · 0 comments
Open

Return correct output shape for R(2+1)D #69

jsjason opened this issue Aug 28, 2019 · 0 comments

Comments

@jsjason
Copy link
Contributor

jsjason commented Aug 28, 2019

Our implementation of the R(2+1)D model outputs tensors of different shapes, depending on the start_index and end_index model parameters given at class instantiation. However, the output_shape() method of R2P1DRunner is set to always return (10, 400), which is the output of the final layer in R(2+1)D. In fact, this is an artifact from #58, in which we made output_shape() a static method; the method cannot access internal attributes like self.start_index and self.end_index to return the correct output shape. We need to change the implementation so that output_shape() can return different values according to model parameters.

One possible way to do this would be to retrieve model parameters from the input pipeline configuration and pass the parameters to output_shape(), similar to what we are doing in benchmark.py:

for step_idx, step in enumerate(pipeline):
  ...
  process_runner = Process(target=runner, args=...,
                           kwargs=step) # <-- right here

This way, we can let the output_shape() method determine which shape to return based on model parameters, while still keeping output_shape() as a static method.

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