Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dom/NetInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class NetInput {
private _treatAsBatchInput: boolean = false;

private _inputDimensions: number[][] = [];
private _inputSize: number;
private _inputSize = 0;

constructor(inputs: Array<TResolvedNetInput>, treatAsBatchInput: boolean = false) {
if (!Array.isArray(inputs)) {
Expand Down
14 changes: 7 additions & 7 deletions src/faceExpressionNet/FaceExpressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export type FaceExpressionLabel = (typeof FACE_EXPRESSION_LABELS)[number];
type ExpressionProbabilities = Record<FaceExpressionLabel, number>;

export class FaceExpressions {
public neutral: number;
public happy: number;
public sad: number;
public angry: number;
public fearful: number;
public disgusted: number;
public surprised: number;
public neutral = 0;
public happy = 0;
public sad = 0;
public angry = 0;
public fearful = 0;
public disgusted = 0;
public surprised = 0;

constructor(probabilities: number[] | Float32Array) {
if (probabilities.length !== 7) {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"module": "commonjs",
"target": "es2020",
"moduleResolution": "node",
"strict": true,
"lib": ["ES2020", "DOM"],
"typeRoots": ["typings", "node_modules/@types"],
"verbatimModuleSyntax": false
Expand Down
Loading