                 break
             }
         }
-        return self.hiddenWeights + self.outputWeights
+        return hiddenLayer.matrix + outputLayer.matrix
     }
     
     /// Returns a serialized array of the network's current weights.
     public func getWeights() -> [Float] {
-        return self.hiddenWeights + self.outputWeights
+        return hiddenLayer.matrix + outputLayer.matrix
     }
     
     /// Resets the network with the given weights (i.e. from a pre-trained network).

                self.randomizeWeights()
                return
            }
            self.hiddenWeights = Array(weights[0..<self.numHiddenWeights])
            self.outputWeights = Array(weights[self.numHiddenWeights..<weights.count])
        } else {
            self.randomizeWeights()
        }
        
    }
    
    /// Propagates the given inputs through the neural network, returning the network's output.

            self.newHiddenWeights[weightIndex] = offset + mfLRErrIn
        }
        
        vDSP_mmov(hiddenLayer.matrix, &previousHiddenWeights, 1, vDSP_Length(numHiddenWeights), 1, 1)
        vDSP_mmov(newHiddenWeights, &hiddenLayer.matrix, 1, vDSP_Length(numHiddenWeights), 1, 1)
        
        // Sum and return the output errors
        return self.outputErrorsCache.reduce(0, combine: { (sum, error) -> Float in
            return sum + abs(error)
