Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Panda-Shawn/DFWLayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFWLayer: Differentiable Frank-Wolfe Optimization Layer

This repo contains code accompaning the paper, DFWLayer: Differentiable Frank-Wolfe Optimization Layer. DFWLayer is a differentiable optimization layer which accelerates both the optimization and backprogation procedure with norm constraints.

Dependencies

pip install -r requirements.txt

Usage

Different-Scale Optimization Problems

We test the efficiency (running time) and accuracy (simularity and distance) for different-scale optimization problems.

cd DFWLayer/numerical_experiment
python test_time_for_norms.py

The problem size can be changed by modifying n=100 in test_time_for_norms.py.

Robotics Tasks Under Imitation Learning

We evaluate the performance of differentiable optimization layers for robotics tasks under imitation learning.

  1. The expert demonstrations are saved in DFWLayer/robotics/expert_data. We provide expert demonstartions for R+O03 and R+O10.
  2. For example, we train policy for R+O03 with DFWLayer.
    cd DFWLayer/robotics
    python train_policy.py --cost_type R+O03 --opt_layer_class dfw_layer --device cuda
    
    The task and layer class can be changed by modifying arguments --cost_type and --opt_layer_class respectively.

About

DFWLayer: Differentiable Frank-Wolfe Optimization Layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages