2020-12-23 18:58:47 +01:00
|
|
|
import * as tf from '../../dist/tfjs.esm';
|
2020-12-23 17:26:55 +01:00
|
|
|
import { ConvParams } from '../common/index';
|
|
|
|
export declare type PointwiseConvParams = {
|
|
|
|
filters: tf.Tensor4D;
|
|
|
|
batch_norm_offset: tf.Tensor1D;
|
|
|
|
};
|
|
|
|
export declare namespace MobileNetV1 {
|
|
|
|
type DepthwiseConvParams = {
|
|
|
|
filters: tf.Tensor4D;
|
|
|
|
batch_norm_scale: tf.Tensor1D;
|
|
|
|
batch_norm_offset: tf.Tensor1D;
|
|
|
|
batch_norm_mean: tf.Tensor1D;
|
|
|
|
batch_norm_variance: tf.Tensor1D;
|
|
|
|
};
|
|
|
|
type ConvPairParams = {
|
|
|
|
depthwise_conv: DepthwiseConvParams;
|
|
|
|
pointwise_conv: PointwiseConvParams;
|
|
|
|
};
|
|
|
|
type Params = {
|
|
|
|
conv_0: PointwiseConvParams;
|
|
|
|
conv_1: ConvPairParams;
|
|
|
|
conv_2: ConvPairParams;
|
|
|
|
conv_3: ConvPairParams;
|
|
|
|
conv_4: ConvPairParams;
|
|
|
|
conv_5: ConvPairParams;
|
|
|
|
conv_6: ConvPairParams;
|
|
|
|
conv_7: ConvPairParams;
|
|
|
|
conv_8: ConvPairParams;
|
|
|
|
conv_9: ConvPairParams;
|
|
|
|
conv_10: ConvPairParams;
|
|
|
|
conv_11: ConvPairParams;
|
|
|
|
conv_12: ConvPairParams;
|
|
|
|
conv_13: ConvPairParams;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
export declare type BoxPredictionParams = {
|
|
|
|
box_encoding_predictor: ConvParams;
|
|
|
|
class_predictor: ConvParams;
|
|
|
|
};
|
|
|
|
export declare type PredictionLayerParams = {
|
|
|
|
conv_0: PointwiseConvParams;
|
|
|
|
conv_1: PointwiseConvParams;
|
|
|
|
conv_2: PointwiseConvParams;
|
|
|
|
conv_3: PointwiseConvParams;
|
|
|
|
conv_4: PointwiseConvParams;
|
|
|
|
conv_5: PointwiseConvParams;
|
|
|
|
conv_6: PointwiseConvParams;
|
|
|
|
conv_7: PointwiseConvParams;
|
|
|
|
box_predictor_0: BoxPredictionParams;
|
|
|
|
box_predictor_1: BoxPredictionParams;
|
|
|
|
box_predictor_2: BoxPredictionParams;
|
|
|
|
box_predictor_3: BoxPredictionParams;
|
|
|
|
box_predictor_4: BoxPredictionParams;
|
|
|
|
box_predictor_5: BoxPredictionParams;
|
|
|
|
};
|
|
|
|
export declare type OutputLayerParams = {
|
|
|
|
extra_dim: tf.Tensor3D;
|
|
|
|
};
|
|
|
|
export declare type NetParams = {
|
|
|
|
mobilenetv1: MobileNetV1.Params;
|
|
|
|
prediction_layer: PredictionLayerParams;
|
|
|
|
output_layer: OutputLayerParams;
|
|
|
|
};
|