adding from_yaml to networks