real-stanford / diffusion_policy

[RSS 2023] Diffusion Policy Visuomotor Policy Learning via Action Diffusion
https://diffusion-policy.cs.columbia.edu/
MIT License
1.1k stars 206 forks source link

How to run state-based notebook with pred_horizon which is not a power of 2? #3

Closed qureshinomaan closed 1 year ago

qureshinomaan commented 1 year ago

Hi, Thanks a lot for making the code very easy to interpret and set up! I have been playing around with the policy, and it seems like currently, it is not able to handle "pred_horizon" which is not a power of 2. For example, it works for pred_horizon = 2, 4, 8, 16 .... but doesn't work for other values. Is there a quick solution to this?

cheng-chi commented 1 year ago

Since the Diffusion Policy in notebooks are implemented with CNN(i.e. UNet)-based backbones, the accepted prediction horizon is limiated by UNet's up/down resolution operations. Transformer based Diffuison Policy in our main repo should be able to accept any prediction horizon.