face-api/src/ops/index.ts

15 lines
331 B
TypeScript
Raw Normal View History

2020-12-23 17:26:55 +01:00
export * from './iou';
export * from './minBbox';
export * from './nonMaxSuppression';
export * from './normalize';
export * from './padToSquare';
export * from './shuffleArray';
2020-08-18 13:54:53 +02:00
export function sigmoid(x: number) {
2020-12-23 17:26:55 +01:00
return 1 / (1 + Math.exp(-x));
2020-08-18 13:54:53 +02:00
}
export function inverseSigmoid(x: number) {
2020-12-23 17:26:55 +01:00
return Math.log(x / (1 - x));
}