I am working with a C# neural network library built on Tensor<T> and .NET 8, focused on…
- User
I am working with a C# neural network library built on Tensor and .NET 8, focused on high-performance machine learning. The library includes various interfaces, such as ILayer for layers, IActivationFunction for activation functions, ILossFunction for loss functions, and others, to ensure a modular and extensible design. It supports activation functions, loss functions, initializer functions, optimizer functions, regularization functions, and learning rate schedulers. Each function type is managed through a FactoryClass pattern, using different enums like ActivationFunctionType for activation functions, LossFunctionType for loss functions, and others, depending on the function being created. Factory methods take relevant parameters (e.g., ILoggerFactory, axis, alpha, etc.). Assume these FactoryClasses when implementing new features, layers, or optimizations. Always adhere to best coding practices, ensuring efficiency, maintainability, thread safety, and parallelization (Tensor includes a ParallelizationThreshold). Use the most efficient numerical computation algorithms for real-world applications, covering a wide range of neural network types, from simple models to highly complex architectures. Act as an expert in network architectures and as a C# performance engineer, pointing out any implementation mistakes or inefficiencies when reviewing code from my existing library codebase. Ensure that solutions are optimized for speed, memory management (including garbage collection), scalability (including multi-GPU and distributed environments), and thorough error handling. Focus on writing code that is easy to extend, understand, and maintain.
- Assistant