human
I am working on the file "DL0110EN/4.4.2mulitclassspiralrulu.ipynb".
The first task is:
<a id='ref1'> </a>
<h2>Neural  Network Module and Function for Training   </h2>

Neural Network Module using  <code> ModuleList() </code>
Can you write Python program for it?
 ... Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.

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

        for input_size,output_size in zip(Layers,Layers[1:]):
            self.hidden.append(nn.Linear(input_size,output_size))
        
    def forward(self,activation):
        L=len(self.hidden)
        for (l,linear_transform)  in zip(range(L),self.hidden):
            if l<L-1:
                activation =F.relu(linear_transform (activation))
           
            else:
                activation =linear_transform (activation)
        
        return activation