human
I am working on the file "DL0110EN/5.1.1Xaviermist1layer.ipynb".
The first task is:
Class or Neral Network with Uniform Initialization
Can you write Python program for it?

Write me a the Python program you requested?
assistant
#Here is the Python program you requested.

class Net_Uniform(nn.Module):
    def __init__(self,Layers):
        super(Net_Uniform,self).__init__()
        self.hidden = nn.ModuleList()

        for input_size,output_size in zip(Layers,Layers[1:]):
            linear=nn.Linear(input_size,output_size)
            linear.weight.data.uniform_(0, 1)
            #inear.weight.data.
            self.hidden.append(linear)
        
    def forward(self,x):
        L=len(self.hidden)
        for (l,linear_transform)  in zip(range(L),self.hidden):
            if l<L-1:
                x =F.tanh(linear_transform (x))
           
            else:
                x =linear_transform (x)
        
        return x