Implement dynamic layer creation with random weight for each node