{"size": 1946, "ext": "js", "max_stars_repo_path": "modeling/node_modules/onnxjs/lib/ops/slice.js", "max_stars_repo_name": "walid-ame/mask-detector", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "modeling/node_modules/onnxjs/lib/ops/slice.js", "max_issues_repo_name": "walid-ame/mask-detector", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "modeling/node_modules/onnxjs/lib/ops/slice.js", "max_forks_repo_name": "walid-ame/mask-detector", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.1403508772, "max_line_length": 96, "alphanum_fraction": 0.562692703}
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SliceV10 = exports.Slice = void 0;
var Slice = /** @class */ (function () {
    function Slice() {
    }
    Slice.prototype.initialize = function (attributes) {
        this.starts = attributes.getInts('starts');
        this.ends = attributes.getInts('ends');
        this.axes = attributes.getInts('axes', []);
    };
    Slice.prototype.checkInputs = function (inputs) {
        if (!inputs || inputs.length !== 1) {
            return false;
        }
        return this.checkInputTypes(inputs);
    };
    Slice.prototype.checkInputTypes = function (inputs) {
        if (inputs[0].type !== 'float32' && inputs[0].type !== 'float64') {
            return false;
        }
        return true;
    };
    return Slice;
}());
exports.Slice = Slice;
var SliceV10 = /** @class */ (function () {
    function SliceV10() {
    }
    SliceV10.prototype.initialize = function (attributes) { };
    SliceV10.prototype.checkInputs = function (inputs) {
        if (!inputs || inputs.length < 3 || inputs.length > 5) {
            return false;
        }
        return this.checkInputTypes(inputs);
    };
    SliceV10.prototype.checkInputTypes = function (inputs) {
        if (inputs[1].type !== 'int32' || inputs[1].dims.length !== 1) {
            return false;
        }
        if (inputs[2].type !== 'int32' || inputs[2].dims.length !== 1) {
            return false;
        }
        if (inputs.length >= 4 && (inputs[3].type !== 'int32' || inputs[3].dims.length !== 1)) {
            return false;
        }
        if (inputs.length >= 5 && (inputs[4].type !== 'int32' || inputs[4].dims.length !== 1)) {
            return false;
        }
        return true;
    };
    return SliceV10;
}());
exports.SliceV10 = SliceV10;
//# sourceMappingURL=slice.js.map