This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import pybullet as pb | |
| import pybullet_data | |
| def read_parameters(dbg_params): | |
| '''Reads values from debug parameters | |
| Parameters | |
| ---------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding:UTF-8 -*- | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.init as init | |
| def weight_init(m): | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def init_gru(cell, gain=1): | |
| cell.reset_parameters() | |
| # orthogonal initialization of recurrent weights | |
| for _, hh, _, _ in cell.all_weights: | |
| for i in range(0, hh.size(0), cell.hidden_size): | |
| I.orthogonal(hh[i:i + cell.hidden_size], gain=gain) | |
| def init_lstm(cell, gain=1): |