thiagopbueno / model-aware-policy-optimization

MAPO: Model-Aware Policy Optimization algorithm
GNU General Public License v3.0
1 stars 0 forks source link

Add variables initializer to GaussianDynamicsModel #52

Closed thiagopbueno closed 5 years ago

thiagopbueno commented 5 years ago

Consider applying some form of variable inititalizer to the dynamics models... maybe something along the lines of ...

def normc_initializer(std=1.0):
    def _initializer(shape, dtype=None, partition_info=None):
        out = np.random.randn(*shape).astype(np.float32)
        out *= std / np.sqrt(np.square(out).sum(axis=0, keepdims=True))
        return tf.constant(out)

    return _initializer