face-api/src/common/types.ts

33 lines
797 B
TypeScript
Raw Normal View History

2020-12-23 18:58:47 +01:00
import * as tf from '../../dist/tfjs.esm';
2020-08-18 13:54:53 +02:00
2020-12-23 17:26:55 +01:00
// eslint-disable-next-line no-unused-vars
2020-08-18 13:54:53 +02:00
export type ExtractWeightsFunction = (numWeights: number) => Float32Array
export type ParamMapping = {
originalPath?: string
paramPath: string
}
export type ConvParams = {
filters: tf.Tensor4D
bias: tf.Tensor1D
}
export type FCParams = {
weights: tf.Tensor2D
bias: tf.Tensor1D
}
export class SeparableConvParams {
2020-12-23 17:26:55 +01:00
// eslint-disable-next-line no-useless-constructor
2020-08-18 13:54:53 +02:00
constructor(
2020-12-23 17:26:55 +01:00
// eslint-disable-next-line no-unused-vars
2020-08-18 13:54:53 +02:00
public depthwise_filter: tf.Tensor4D,
2020-12-23 17:26:55 +01:00
// eslint-disable-next-line no-unused-vars
2020-08-18 13:54:53 +02:00
public pointwise_filter: tf.Tensor4D,
2020-12-23 17:26:55 +01:00
// eslint-disable-next-line no-unused-vars
public bias: tf.Tensor1D,
// eslint-disable-next-line no-empty-function
2020-08-18 13:54:53 +02:00
) {}
2020-12-23 17:26:55 +01:00
}