neuronetwork
Version:
A hybrid math & neural engine with classic functions and AI computations
73 lines (71 loc) • 3.27 kB
JavaScript
import * as NextMathFUNC from "./functions/NextMath.js";
import * as NeuroMathFUNC from "./functions/NeuroMath.js";
export default class NeuroNetwork {
static NextMath = {
add: NextMathFUNC.NextMath_add,
subtract: NextMathFUNC.NextMath_subtract,
multiply: NextMathFUNC.NextMath_multiply,
divide: NextMathFUNC.NextMath_divide,
modulo: NextMathFUNC.NextMath_modulo,
power: NextMathFUNC.NextMath_power,
sqrt: NextMathFUNC.NextMath_sqrt,
absolute: NextMathFUNC.NextMath_absolute,
gcd: NextMathFUNC.NextMath_gcd,
isPrime: NextMathFUNC.NextMath_isPrime,
factorial: NextMathFUNC.NextMath_factorial,
fibonacci: NextMathFUNC.NextMath_fibonacci,
max: NextMathFUNC.NextMath_max,
min: NextMathFUNC.NextMath_min,
isEven: NextMathFUNC.NextMath_isEven,
isOdd: NextMathFUNC.NextMath_isOdd,
reverseNumber: NextMathFUNC.NextMath_reverseNumber,
isPalindrome: NextMathFUNC.NextMath_isPalindrome,
countDigits: NextMathFUNC.NextMath_countDigits,
sumOfDigits: NextMathFUNC.NextMath_sumOfDigits,
XOR: NextMathFUNC.NextMath_xor,
AND: NextMathFUNC.NextMath_and,
NOT: NextMathFUNC.NextMath_not,
leftShift: NextMathFUNC.NextMath_leftShift,
rightShift: NextMathFUNC.NextMath_rightShift,
average: NextMathFUNC.NextMath_average,
findMax: NextMathFUNC.NextMath_findMax,
findMin: NextMathFUNC.NextMath_findMin,
primeFactors: NextMathFUNC.NextMath_primeFactors,
isPerfectNumber: NextMathFUNC.NextMath_isPerfectNumber,
digitalRoot: NextMathFUNC.NextMath_digitalRoot
}
static NeuroMath = {
Activation: {
ReLu: NeuroMathFUNC.NeuroMath_Activation_ReLu,
LeakyReLU: NeuroMathFUNC.NeuroMath_Activation_LeakyReLU,
Sigmoid: NeuroMathFUNC.NeuroMath_Activation_Sigmoid,
Tanh: NeuroMathFUNC.NeuroMath_Activation_Tanh,
Softmax: NeuroMathFUNC.NeuroMath_Activation_Softmax,
Swish: NeuroMathFUNC.NeuroMath_Activation_Swish,
GELU: NeuroMathFUNC.NeuroMath_Activation_GELU,
ELU: NeuroMathFUNC.NeuroMath_Activation_ELU,
},
Loss: {
MSE: NeuroMathFUNC.NeuroMath_Loss_MSE,
// Binary Cross Entropy
BCE: NeuroMathFUNC.NeuroMath_Loss_BCE,
// Categorical Cross Entropy
CCE: NeuroMathFUNC.NeuroMath_Loss_CCE,
// MAE
MAE: NeuroMathFUNC.NeuroMath_Loss_MAE,
},
Layer: {
Dense: NeuroMathFUNC.NeuroMath_Layer_Dense,
Flatten: NeuroMathFUNC.NeuroMath_Layer_Flatten,
Dropout: NeuroMathFUNC.NeuroMath_Layer_Dropout,
BatchNormalization: NeuroMathFUNC.NeuroMath_Layer_BatchNormalization,
Embedding: NeuroMathFUNC.NeuroMath_Layer_Embedding,
Conv2D: NeuroMathFUNC.NeuroMath_Layer_Conv2D,
},
Optimizer: {
SGD: NeuroMathFUNC.NeuroMath_Optimizer_SGD,
Adam: NeuroMathFUNC.NeuroMath_Optimizer_Adam,
// RMSProp: NeuroMathFUNC.NeuroMath_Optimizer_RMSProp
}
}
};