title: The output of my neural network is negative even if i am using ReLU on every layer
body: <p>I am a beginner at deep learning.I am using PyTorch to implement a neural network to train some chemical data. the input range between (0 to 1 )  with no negative values and I am using the ReLu activation function on every layer so I didn't expect to see a negative value in the output</p>
  <p>my input size: 9 features
  the output size: 7 Features
  number of layers: 5</p>
  <p>I can predict 6 of the 7 features correctly without problem only I found one of them has always negative values which I don't know why !. As far as i know, ReLU can't generate negative values</p>
  <p>This is my neural network model:</p>
  <pre><code>class NNModel(nn.Module):
      
      def __init__(self, in_size, hidden_size, out_size):
          super().__init__()
          # hidden layers
          self.linear1 = nn.Linear(in_size, hidden_size)
          self.relu1 = nn.ReLU()
  
          self.linear2 = nn.Linear(hidden_size, hidden_size)
          self.relu2 = nn.ReLU()
  
          self.linear3 = nn.Linear(hidden_size, hidden_size)
          self.relu3 = nn.ReLU()
  
          self.linear4 = nn.Linear(hidden_size, hidden_size)
          self.relu4 = nn.ReLU()
          # output layer
          self.linear5 = nn.Linear(hidden_size, out_size)
  
      def forward(self, xb):
          
          # Get intermediate outputs using hidden layer
          out = self.linear1(xb)
          # Apply activation function
          out = self.relu1(out)
  
          out=self.linear2(out)
          out = self.relu2(out)
  
          out=self.linear3(out)
          out = self.relu3(out)
  
          out=self.linear4(out)
          out = self.relu4(out)
          # Get predictions using output layer
          out = self.linear5(out)
          return out
      
      def training_step(self, batch):
          inputs, targets = batch 
          out = self(inputs)                  # Generate predictions
          L=nn.MSELoss()
          loss = L(out, targets) # Calculate loss
                
          return loss
      
      def validation_step(self, batch):
          inputs, targets = batch 
          out = self(inputs)                    # Generate predictions
          L=nn.MSELoss()
          loss = L(out, targets)   # Calculate loss
          return {'val_loss': loss.detach() }
          
      def validation_epoch_end(self, outputs):
          batch_losses = [x['val_loss'] for x in outputs]
          epoch_loss = torch.stack(batch_losses).mean()   # Combine losses
          return {'val_loss': epoch_loss.item()}
      
      def epoch_end(self, epoch, result):
          print(&quot;Epoch [{}], val_loss: {}&quot;.format(epoch+1, result['val_loss']))
  </code></pre>
  <p>Any help, tips, or advice will be appreciated</p>