face-api/dist/face-api.min.js

114 lines
349 KiB
JavaScript
Raw Normal View History

var faceapi=(()=>{var Xs=Object.defineProperty,Sv=Object.prototype.hasOwnProperty,S=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),lf=e=>Xs(e,"__esModule",{value:!0}),Oe=(e,t)=>{lf(e);for(var n in t)Xs(e,n,{get:t[n],enumerable:!0})},Tv=(e,t)=>{if(lf(e),typeof t=="object"||typeof t=="function")for(let n in t)!Sv.call(e,n)&&n!=="default"&&Xs(e,n,{get:()=>t[n],enumerable:!0});return e},Iv=e=>e&&e.__esModule?e:Tv(Xs({},"default",{value:e,enumerable:!0}),e);var Be=S(Av=>{Oe(Av,{__assign:()=>Zp,__asyncDelegator:()=>Wv,__asyncGenerator:()=>Uv,__asyncValues:()=>qv,__await:()=>hi,__awaiter:()=>Ov,__classPrivateFieldGet:()=>$v,__classPrivateFieldSet:()=>Hv,__createBinding:()=>Qp,__decorate:()=>Rv,__exportStar:()=>Dv,__extends:()=>Nv,__generator:()=>kv,__importDefault:()=>Gv,__importStar:()=>jv,__makeTemplateObject:()=>Bv,__metadata:()=>Ev,__param:()=>Cv,__read:()=>uf,__rest:()=>_v,__spread:()=>Fv,__spreadArrays:()=>Mv,__values:()=>el});var Xp=function(e,t){return Xp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Xp(e,t)};function Nv(e,t){Xp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n())}var Zp=function(){return Zp=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Zp.apply(this,arguments)};function _v(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Rv(e,t,n,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,n,o):a(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function Cv(e,t){return function(n,r){t(n,r,e)}}function Ev(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ov(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{p(r.next(l))}catch(u){a(u)}}function c(l){try{p(r.throw(l))}catch(u){a(u)}}function p(l){l.done?o(l.value):i(l.value).then(s,c)}p((r=r.apply(e,t||[])).next())})}function kv(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(p){return function(l){return c([p,l])}}function c(p){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=p[0]&2?i.return:p[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,p[1])).done)return o;(i=0,o)&&(p=[p[0]&2,o.value]);switch(p[0]){case 0:case 1:o=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,i=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){n.label=p[1];break}if(p[0]===6&&n.label<o[1]){n.label=o[1],o=p;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(p);break}o[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(e,n)}catch(l){p=[6,l],i=0}finally{r=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}var Qp=Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function Dv(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qp(t,e,n)}function el(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=
2020-08-18 14:04:15 +02:00
`)),c.join(`
`)}function v0(e,t,n,r){const i=Z(t),o=r[r.length-1],a=new Array(o).fill(0),s=t.length,c=n==="complex64"?js(e):e;if(s>1)for(let p=0;p<i/o;p++){const l=p*o;for(let u=0;u<o;u++)a[u]=Math.max(a[u],Ps(c[l+u],0,n).length)}return a}function Ps(e,t,n){let r;return Array.isArray(e)?r=`${parseFloat(e[0].toFixed(ym))} + ${parseFloat(e[1].toFixed(ym))}j`:Rt(e)?r=`'${e}'`:n==="bool"?r=Ay(e):r=parseFloat(e.toFixed(ym)).toString(),ar(r,t)}function Ay(e){return e===0?"false":"true"}function Op(e,t,n,r,i,o=!0){const a=n==="complex64"?2:1,s=t[0],c=t.length;if(c===0){if(n==="complex64"){const w=js(e);return[Ps(w[0],0,n)]}return n==="bool"?[Ay(e[0])]:[e[0].toString()]}if(c===1){if(s>Ty){const L=Bs*a;let T=Array.from(e.slice(0,L)),A=Array.from(e.slice((s-Bs)*a,s*a));return n==="complex64"&&(T=js(T),A=js(A)),["["+T.map((_,N)=>Ps(_,i[N],n)).join(", ")+", ..., "+A.map((_,N)=>Ps(_,i[s-Bs+N],n)).join(", ")+"]"]}const w=n==="complex64"?js(e):Array.from(e);return["["+w.map((L,T)=>Ps(L,i[T],n)).join(", ")+"]"]}const p=t.slice(1),l=r.slice(1),u=r[0]*a,m=[];if(s>Ty){for(let w=0;w<Bs;w++){const L=w*u,T=L+u;m.push(...Op(e.slice(L,T),p,n,l,i,!1))}m.push("...");for(let w=s-Bs;w<s;w++){const L=w*u,T=L+u;m.push(...Op(e.slice(L,T),p,n,l,i,w===s-1))}}else for(let w=0;w<s;w++){const L=w*u,T=L+u;m.push(...Op(e.slice(L,T),p,n,l,i,w===s-1))}const b=c===2?",":"";m[0]="["+m[0]+b;for(let w=1;w<m.length-1;w++)m[w]=" "+m[w]+b;let y=`,
2020-08-18 14:04:15 +02:00
`;for(let w=2;w<c;w++)y+=`
`;return m[m.length-1]=" "+m[m.length-1]+"]"+(o?"":y),m}function js(e){const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}class yr{constructor(e,t,n){if(this.dtype=t,this.shape=e.slice(),this.size=Z(e),n!=null){const r=n.length;f(r===this.size,()=>`Length of values '${r}' does not match the size inferred by the shape '${this.size}'.`)}if(t==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||dm(t,this.size),this.strides=Bt(e)}set(e,...t){t.length===0&&(t=[0]),f(t.length===this.rank,()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`);const n=this.locToIndex(t);this.values[n]=e}get(...e){e.length===0&&(e=[0]);let t=0;for(const r of e){if(r<0||r>=this.shape[t]){const i=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(i)}t++}let n=e[e.length-1];for(let r=0;r<e.length-1;++r)n+=this.strides[r]*e[r];return this.values[n]}locToIndex(e){if(this.rank===0)return 0;if(this.rank===1)return e[0];let t=e[e.length-1];for(let n=0;n<e.length-1;++n)t+=this.strides[n]*e[n];return t}indexToLoc(e){if(this.rank===0)return[];if(this.rank===1)return[e];const t=new Array(this.shape.length);for(let n=0;n<t.length-1;++n)t[n]=Math.floor(e/this.strides[n]),e-=t[n]*this.strides[n];return t[t.length-1]=e,t}get rank(){return this.shape.length}toTensor(){return jt().makeTensor(this.values,this.shape,this.dtype)}}let jt=null,oi=null,S0=null;function Ny(e){jt=e}function _y(e){oi=e}function Ry(e){S0=e}class de{constructor(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=Z(e),this.strides=Bt(e),this.dataId=n,this.id=r,this.rankType=this.rank<5?this.rank.toString():"higher"}get rank(){return this.shape.length}async buffer(){const e=await this.data();return oi.buffer(this.shape,this.dtype,e)}bufferSync(){return oi.buffer(this.shape,this.dtype,this.dataSync())}async array(){const e=await this.data();return cr(this.shape,e)}arraySync(){return cr(this.shape,this.dataSync())}async data(){this.throwIfDisposed();const e=jt().read(this.dataId);if(this.dtype==="string"){const t=await e;try{return t.map(n=>Ep(n))}catch(n){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataSync(){this.throwIfDisposed();const e=jt().readSync(this.dataId);if(this.dtype==="string")try{return e.map(t=>Ep(t))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();const e=await jt().read(this.dataId);return this.dtype==="string"?e:new Uint8Array(e.buffer)}dispose(){if(this.isDisposed)return;jt().disposeTensor(this),this.isDisposedInternal=!0}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return oi.print(this,e)}clone(){return this.throwIfDisposed(),oi.clone(this)}toString(e=!1){const t=this.dataSync();return Iy(t,this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),oi.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),jt().makeVariable(this,e,t,n)}}Object.defineProperty(de,Symbol.hasInstance,{value:e=>!!e&&e.dataId!=null&&e.shape!=null&&e.dtype!=null});class Nn extends de{constructor(e,t,n,r){super(e.shape,e.dtype,e.dataId,r);this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!Le(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);jt().disposeTensor(this),this.dataId=e.dataId,jt().incRef(this,null)}dispose(){jt().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty(Nn,Symbol.hasInstance,{value:e=>e instanceof de&&e.assign!=null&&e.assign instanceof Function});var al;(function(e){e.R0="R0",e.R1="R1",e.R2
with dtype ${p.dtype}. `)});const r=z(t,n[0].shape)[0],i=Em(n.map(p=>p.shape),r);if(Z(i)===0)return Qe([],i);if(n=n.filter(p=>p.size>0),n.length===1)return n[0];const o=n.map(p=>p.shape);Cm(o,r);const a=(p,l)=>{const u=p.concat(n,r);return l(n),u},s=n,c={axis:t};return g.runKernelFunc(a,s,null,eo,c)}const re=d({concat_:rR});function iR(e,t,n=!1,r=!1){let i=h(e,"a","matMul"),o=h(t,"b","matMul");[i,o]=V(i,o),f(i.rank>=2&&o.rank>=2&&i.rank===o.rank,()=>`Error in matMul: inputs must have the same rank of at least 2, got ranks ${i.rank} and ${o.rank}.`);const a=n?i.shape[i.rank-2]:i.shape[i.rank-1],s=r?o.shape[o.rank-1]:o.shape[o.rank-2],c=n?i.shape[i.rank-1]:i.shape[i.rank-2],p=r?o.shape[o.rank-2]:o.shape[o.rank-1],l=i.shape.slice(0,-2),u=o.shape.slice(0,-2),m=Z(l),b=Z(u);f(Le(l,u),()=>`Error in matMul: outer dimensions (${l}) and (${u}) of Tensors with shapes ${i.shape} and ${o.shape} must match.`),f(a===s,()=>`Error in matMul: inner shapes (${a}) and (${s}) of Tensors with shapes ${i.shape} and ${o.shape} and transposeA=${n} and transposeB=${r} must match.`);const y=i.shape.slice(0,-2).concat([c,p]),w=n?x(i,[m,a,c]):x(i,[m,c,a]),L=r?x(o,[b,p,s]):x(o,[b,s,p]),T=(C,F)=>(F([w,L]),C.batchMatMul(w,L,n,r)),A={a:w,b:L},_={transposeA:n,transposeB:r},N=g.runKernelFunc(T,A,null,Ki,_);return x(N,y)}const K=d({matMul_:iR});function oR(e,t){let n=h(e,"a","mul"),r=h(t,"b","mul");[n,r]=V(n,r);const i=(a,s)=>{const c=a.multiply(n,r);return s([n,r]),c},o={a:n,b:r};return g.runKernelFunc(i,o,null,Fo)}const v=d({mul_:oR});function sR(e){const t=h(e,"x","sigmoid"),n={x:t};return g.runKernelFunc((r,i)=>{const o=r.sigmoid(t);return i([o]),o},n,null,rs)}const St=d({sigmoid_:sR});const kf={};Oe(kf,{assertParamsValid:()=>Om,computeFlatOffset:()=>cR,computeOutShape:()=>km,isSliceContinous:()=>aR,maskToAxes:()=>Hs,parseSliceParams:()=>Ys,startForAxis:()=>Wm,startIndicesWithElidedDims:()=>Fm,stopForAxis:()=>qm,stopIndicesWithElidedDims:()=>Mm,stridesForAxis:()=>Um,stridesWithElidedDims:()=>Dm});function Om(e,t,n){f(e.rank===t.length,()=>`Error in slice${e.rank}D: Length of begin ${t} must match the rank of the array (${e.rank}).`),f(e.rank===n.length,()=>`Error in slice${e.rank}D: Length of size ${n} must match the rank of the array (${e.rank}).`);for(let r=0;r<e.rank;++r)f(t[r]+n[r]<=e.shape[r],()=>`Error in slice${e.rank}D: begin[${r}] + size[${r}] (${t[r]+n[r]}) would overflow input.shape[${r}] (${e.shape[r]})`)}function Hs(e){const t=[];let n=0;for(;e>0;)e&1&&t.push(n),e/=2,n++;return t}function km(e,t,n){const r=[];for(let i=0;i<e.length;i++)r[i]=Math.ceil((t[i]-e[i])/n[i]);return r}function Dm(e,t,n,r){const i=[...e];for(let o=i.length;o<r.length;o++)i.push(1);for(let o=0;o<n;o++)o===0?i[t]=1:(i.splice(t,0,1),i.pop());return i}function Fy(e,t,n){return n<=e?n:n-(t-1)}function My(e,t){const n=[];for(let r=0;r<e;r++)n.push(t+r);return n}function Fm(e,t,n,r,i){const o=[...i],a=My(n,t);for(let s=0;s<o.length;s++)if(a.indexOf(s)>-1)o[s]=0;else{const c=Fy(t,n,s);let p=r[c];e&1<<c&&(p=0),o[s]=p}return o}function Mm(e,t,n,r,i){const o=[...i],a=My(n,t);for(let s=0;s<o.length;s++)if(a.indexOf(s)>-1)o[s]=Number.MAX_SAFE_INTEGER;else{const c=Fy(t,n,s);let p=r[c];e&1<<c&&(p=Number.MAX_SAFE_INTEGER),o[s]=p}for(let s=0;s<o.length;s++){const c=i[s];o[s]<0&&(o[s]+=c),o[s]=ti(0,o[s],i[s])}return o}function Um(e,t,n){let r=e[t];return(n&1<<t||r==null)&&(r=1),r}function Wm(e,t,n,r,i,o){let a=t[i];const s=n[i]||1;(e&1<<i||o&1<<i||a==null)&&(s>0?a=Number.MIN_SAFE_INTEGER:a=Number.MAX_SAFE_INTEGER);const c=r[i];return a<0&&(a+=c),a=ti(0,a,c-1),a}function qm(e,t,n,r,i,o){let a=t[i];const s=n[i]||1;(e&1<<i||o&1<<i||a==null)&&(s>0?a=Number.MAX_SAFE_INTEGER:a=Number.MIN_SAFE_INTEGER);const c=r[i];return a<0&&(a+=c),s>0?a=ti(0,a,c):a=ti(-1,a,c-1),a}function aR(e,t,n){let r=n.length;for(let i=0;i<n.length;i++)if(n[i]>1){r=i;break}for(let i=r+1;i<n.length;i++)if(t[i]>0||n[i]!==e[i])return!1;return!0}function cR(e,t){let n=e.length>0?e[e.length-1]:1;for(let r=0;r<e.length-1;r++)n+=e[r]*t[r];return n}function Ys(e,t,n){let r;typeof t=="number"?r=[t,...new Array(e.r
${i} and ${t} for depthToSpace with input shape
${r.shape}`),f(o*t>=0,()=>`Negative dimension size caused by overflow when multiplying
${o} and ${t} for depthToSpace with input shape
${r.shape}`),f(a%(t*t)===0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${a} for depthToSpace with input shape ${r.shape}`);const s=l=>l.depthToSpace(r,t,n),c={x:r},p={blockSize:t,dataFormat:n};return g.runKernelFunc(s,c,null,zu,p)}const pu=d({depthToSpace_:MR});function UR(e,t,n,r,i="NHWC",o=[1,1],a){const s=h(e,"x","depthwiseConv2d"),c=h(t,"filter","depthwiseConv2d");let p=s,l=!1;s.rank===3&&(l=!0,p=x(s,[1,s.shape[0],s.shape[1],s.shape[2]])),f(p.rank===4,()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${p.rank}.`),f(c.rank===4,()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ${c.rank}.`),f(p.shape[3]===c.shape[2],()=>`Error in depthwiseConv2d: number of input channels (${p.shape[3]}) must match the inChannels dimension in filter ${c.shape[2]}.`),a!=null&&f(J(r),()=>`Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode ${a} but got pad ${r}.`);const u=(w,L)=>{o==null&&(o=[1,1]),f(ae(n,o),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`);const T=We(p.shape,c.shape,n,o,r,a,!0),A=w.depthwiseConv2D(p,c,T);return L([p,c]),A},m={x:p,filter:c},b={strides:n,pad:r,dataFormat:i,dilations:o,dimRoundingMode:a},y=g.runKernelFunc(u,m,null,ao,b);return l?x(y,[y.shape[1],y.shape[2],y.shape[3]]):y}const zn=d({depthwiseConv2d_:UR});function WR(e){const t=h(e,"x","diag"),n=i=>{const o=x(t,[t.size]),a=i.diag(o),s=[...e.shape,...e.shape];return x(a,s)},r={x:t};return g.runKernelFunc(n,r,null,Ju)}const cu=d({diag_:WR});function qR(e,t,n,r,i=[1,1],o="NHWC"){const a=h(e,"x","dilation2d"),s=h(t,"filter","dilation2d");f(a.rank===3||a.rank===4,()=>`Error in dilation2d: input must be rank 3 or 4, but got rank ${a.rank}.`),f(s.rank===3,()=>`Error in dilation2d: filter must be rank 3, but got rank ${s.rank}.`),f(o==="NHWC",()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${o}`);let c=a,p=!1;a.rank===3&&(c=x(a,[1,a.shape[0],a.shape[1],a.shape[2]]),p=!0);const l={x:c,filter:s},u={strides:n,pad:r,dilations:i},m=g.runKernel(co,l,u);return p?x(m,[m.shape[1],m.shape[2],m.shape[3]]):m}const au=d({dilation2d_:qR});function BR(e,t){let n=h(e,"a","floorDiv"),r=h(t,"b","floorDiv");[n,r]=V(n,r);const i=(a,s)=>{const c=a.floorDiv(n,r);return s([n,r]),c},o={a:n,b:r};return g.runKernelFunc(i,o,null,go)}const Ri=d({floorDiv_:BR});function PR(e,t){let n=h(e,"a","div"),r=h(t,"b","div");if([n,r]=V(n,r),n.dtype==="int32"&&r.dtype==="int32")return Ri(n,r);const i=(s,c)=>{const p=s.realDivide(n,r);return c([n,r]),p},o={a:n,b:r},a={};return g.runKernelFunc(i,o,null,po,a)}const M=d({div_:PR});function jR(e,t){const n=e.length,r=[];for(let i=0;i<n;i++){const o=n-1-i,a=e[o]||1,s=t[t.length-1-i]||1;s>1&&a===1&&r.unshift(o)}return r}function ie(e,t){const n=[];for(let r=0;r<t.length;r++){const i=e[e.length-r-1],o=t.length-r-1,a=t[o];(i==null||i===1&&a>1)&&n.unshift(o)}return n}function H(e,t){const n=[],r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let o=e[e.length-i-1];o==null&&(o=1);let a=t[t.length-i-1];if(a==null&&(a=1),o===1)n.unshift(a);else if(a===1)n.unshift(o);else if(o!==a){const s=`Operands could not be broadcast together with shapes ${e} and ${t}.`;throw Error(s)}else n.unshift(o)}return n}function GR(e,t){let n=h(e,"a","equal"),r=h(t,"b","equal");[n,r]=V(n,r),H(n.shape,r.shape);const i=a=>a.equal(n,r),o={a:n,b:r};return g.runKernelFunc(i,o,null,eh)}const Kt=d({equal_:GR});function $R(e,t,n){const r=h(t,"a","where"),i=h(n,"b","where"),o=h(e,"condition","where","bool"),a=H(r.shape,i.shape),s=Ir(r,a),c=Ir(i,a);o.rank===1&&f(o.shape[0]===r.shape[0],()=>"The first dimension of `a` must match the size of `condition`."),o.rank!==1&&$(o.shape,c.shape,"Error in where: ");const p=(u,m)=>{const b=u.select(o,s,c);return m([o]),b},l={condition:o,t:s,e:c};return g.runKernelFunc(p,l,null,Xo)}const Ae=d({where_:$R});function HR(e){const t=h(e,"x","zerosLike"),n={x:t};return g.runKernelFunc(r=>r.zerosLike(t),n,null,ws)}const W=d({zerosLike_:HR});function YR(e,t){let n=h(e,"a","div"),r=h(t,"b","div");
rank ${o.rank}.`),f(J(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let a=o,s=!1;o.rank===3&&(s=!0,a=x(o,[1,o.shape[0],o.shape[1],o.shape[2]]));const c=(m,b)=>{const y=m.localResponseNormalization4D(a,t,n,r,i);return b([a,y]),y},p={x:a},l={depthRadius:t,bias:n,alpha:r,beta:i},u=g.runKernelFunc(c,p,null,No,l);return s?x(u,[u.shape[1],u.shape[2],u.shape[3]]):u}const Jl=d({localResponseNormalization_:L1});function v1(e){const t=h(e,"x","log"),n={x:t};return g.runKernelFunc((r,i)=>{const o=r.log(t);return i([t]),o},n,null,To)}const gt=d({log_:v1});function S1(e){const t=h(e,"x","log1p"),n={x:t};return g.runKernelFunc((r,i)=>{const o=r.log1p(t);return i([t]),o},n,null,Io)}const Ni=d({log1p_:S1});function aS(e){return f(qt(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{const r=h(t,"x","tf.grad",null),i=n!=null?h(n,"dy","tf.grad"):null;return g.tidy(()=>{const{value:o,grads:a}=g.gradients(()=>e(r),[r],i);return i!=null&&$(o.shape,i.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),Up(a),a[0]})}}function cS(e){return f(qt(e),()=>"The f passed in grads(f) must be a function"),(t,n)=>{f(Array.isArray(t),()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s");const r=rn(t,"args","tf.grads",null),i=n!=null?h(n,"dy","tf.grads"):null;return g.tidy(()=>{const{value:o,grads:a}=g.gradients(()=>e(...r),r,i);return i!=null&&$(o.shape,i.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Up(a),a})}}function pS(e){return f(qt(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{f(t instanceof de,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),f(n==null||n instanceof de,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");const{grads:r,value:i}=g.gradients(()=>e(t),[t],n);return Up(r),{grad:r[0],value:i}}}function lS(e){return f(qt(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{f(Array.isArray(t)&&t.every(i=>i instanceof de),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),f(n==null||n instanceof de,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");const r=g.gradients(()=>e(...t),t,n);return n!=null&&$(r.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Up(r.grads),r}}function kh(e,t){f(qt(e),()=>"The f passed in variableGrads(f) must be a function"),f(t==null||Array.isArray(t)&&t.every(p=>p instanceof Nn),()=>"The varList passed in variableGrads(f, varList) must be an array of variables");const n=t!=null;if(!n){t=[];for(const p in g.registeredVariables)t.push(g.registeredVariables[p])}const r=n?t.filter(p=>!p.trainable):null,i=t.length;t=t.filter(p=>p.trainable),f(t.length>0,()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${i} variables is trainable.`);const o=!0,{value:a,grads:s}=g.gradients(e,t,null,o);f(s.some(p=>p!=null),()=>"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."),f(a.rank===0,()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${a.rank} tensor`);const c={};return t.forEach((p,l)=>{s[l]!=null&&(c[p.name]=s[l])}),r!=null&&r.forEach(p=>c[p.name]=null),{value:a,grads:c}}function $e(e){return g.customGrad(e)}function Up(e){const t=e.filter(n=>n==null).length;if(t>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that
the f you passed encloses all operations that lead from x to y.`)}function T1(e){const t=h(e,"x","neg"),n={x:t};return g.runKernelFunc(r=>r.neg(t),n,null,Mo)}const Q=d({neg_:T1});function I1(e){const t=h(e,"x","softplus"),n={x:t};return g.runKernelFunc((r,i)=>{const o=r.softplus(t);return i([t]),o},n,null,is)}const gi=d({softplus_:I1});function A1(e){const t=h(e,"x","logSigmoid"),n=$e(r=>{const i=Q(gi(Q(r))),o=a=>{const s=v(a,St(Q(r)));return s};return{value:i,gradFunc:o}});return n(t)}const Kl=d({logSigmoid_:A1});function N1(e,t=null,n=!1){const r=h(e,"x","max"),i=(s,c)=>{const p=z(t,r.shape);let l=p;const u=he(l,r.rank);let m=r;u!=null&&(m=X(r,u),l=Ee(l.length,m.rank));const b=s.max(m,l);u!=null&&m.dispose();let y=b;if(n){const w=fe(y.shape,z(t,r.shape));y=x(y,w),b.dispose()}return c([r,y]),y},o={x:r},a={reductionIndices:t,keepDims:n};return g.runKernelFunc(i,o,null,_o,a)}const st=d({max_:N1});function _1(e,t){let n=h(e,"a","sub"),r=h(t,"b","sub");[n,r]=V(n,r);const i=(a,s)=>{const c=a.subtract(n,r);return s([n,r]),c},o={a:n,b:r};return g.runKernelFunc(i,o,null,us)}const D=d({sub_:_1});function R1(e,t=null,n=!1){let r=h(e,"x","sum");r.dtype==="bool"&&(r=R(r,"int32"));const i=(s,c)=>{c([r]);const p=z(t,r.shape),l=he(p,r.rank);let u=p,m=r;l!=null&&(m=X(r,l),u=Ee(u.length,r.rank));let b=s.sum(m,u);if(n){const y=fe(b.shape,p);b=x(b,y)}return b},o={x:r},a={axis:t,keepDims:n};return g.runKernelFunc(i,o,null,ss,a)}const U=d({sum_:R1});function C1(e,t=-1){const n=h(e,"logits","logSoftmax");if(t===-1&&(t=n.rank-1),t!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${t}`);const r=(a,s)=>{const c=!0,p=st(e,t,!0),l=D(e,p),u=D(R(l,"float32"),gt(U(Ne(l),t,c)));return s([u]),u},i={logits:n},o={axis:t};return g.runKernelFunc(r,i,null,Ao,o)}const Vl=d({logSoftmax_:C1});function E1(e,t=null,n=!1){const r=h(e,"x","logSumExp"),i=z(t,r.shape),o=st(r,i,!0),a=D(r,o),s=Ne(a),c=U(s,i),p=gt(c),l=O(x(o,p.shape),p);if(n){const u=fe(l.shape,i);return x(l,u)}return l}const Ai=d({logSumExp_:E1});function O1(e,t){const n=h(e,"a","logicalAnd","bool"),r=h(t,"b","logicalAnd","bool");H(n.shape,r.shape);const i={a:n,b:r};return g.runKernelFunc(o=>o.logicalAnd(n,r),i,null,uh)}const ft=d({logicalAnd_:O1});function k1(e){const t=h(e,"x","logicalNot","bool"),n={x:t};return g.runKernelFunc(r=>r.logicalNot(t),n,null,hh)}const Pn=d({logicalNot_:k1});function D1(e,t){const n=h(e,"a","logicalOr","bool"),r=h(t,"b","logicalOr","bool");H(n.shape,r.shape);const i={a:n,b:r};return g.runKernelFunc(o=>o.logicalOr(n,r),i,null,dh)}const Ii=d({logicalOr_:D1});function F1(e,t){const n=h(e,"a","logicalXor","bool"),r=h(t,"b","logicalXor","bool");return H(n.shape,r.shape),ft(Ii(e,t),Pn(ft(e,t)))}const zl=d({logicalXor_:F1});function M1(e,t,n,r,i){const o=h(e,"x","maxPool"),a=1;let s=o,c=!1;o.rank===3&&(c=!0,s=x(o,[1,o.shape[0],o.shape[1],o.shape[2]])),f(s.rank===4,()=>`Error in maxPool: input must be rank 4 but got rank ${s.rank}.`),f(ae(n,a),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),i!=null&&f(J(r),()=>`Error in maxPool: pad must be an integer when using, dimRoundingMode ${i} but got pad ${r}.`);const p=(b,y)=>{const w=Ct(s.shape,t,n,1,r,i);let L;return w.filterWidth===1&&w.filterHeight===1&&Le(w.inShape,w.outShape)?L=s.clone():L=b.maxPool(s,w),y([s,L]),L},l={x:s},u={filterSize:t,strides:n,pad:r,dimRoundingMode:i},m=g.runKernelFunc(p,l,null,Co,u);return c?x(m,[m.shape[1],m.shape[2],m.shape[3]]):m}const Ti=d({maxPool_:M1});function U1(e,t=[1,1,1],n,r,i,o="NDHWC",a){a==null?a=[1,1,1]:ge("dilations is deprecated, this field will be gone in v3.0.0.");const s=h(e,"x","maxPool3d");let c=s,p=!1;s.rank===4&&(p=!0,c=x(s,[1,s.shape[0],s.shape[1],s.shape[2],s.shape[3]])),f(c.rank===5,()=>`Error in maxPool3d: x must be rank 5 but got rank ${c.rank}.`),f(o==="NDHWC",()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${o}`),f(ae(n,a),()=>`Error in maxPool3d: Either strides or dilations must be 1. Got strides ${n} and dilat
Actual: ${i}.
Expected: ${o}.`);for(let a=0;a<o.length;++a){const s=i[a],c=o[a];if(!n(s,c))throw new Error(`Arrays differ: actual[${a}] = ${s}, expected[${a}] = ${c}.
Actual: ${i}.
Expected: ${o}.`)}}function hC(e,t){e().then(()=>t.fail(),()=>t())}function dC(e,t){const n=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Rt(e)||Rt(e[0])||Rt(t)||Rt(t[0])?jm(e,n,(r,i)=>r==i):jm(e,t,(r,i)=>Gm(r,i,0))}function mC(e,t,n){if(n==null&&(n=Pm()),!Gm(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`)}function Gm(e,t,n){return!isFinite(e)&&!isFinite(t)?!0:!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function fC(e,t,n){for(let r=0;r<e.length;r++)if(e[r]<t||e[r]>n)throw new Error(`Value out of range:${e[r]} low: ${t}, high: ${n}`)}function gC(e,t){expect(new Float32Array(e)).toEqual(new Float32Array(t))}const Wp=Iv(Nf());class zs{constructor(e,t,n,r,i){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+this.stdDev*2,this.lower=this.mean-this.stdDev*2);const o=i||Math.random();this.random=Wp.alea(o.toString())}nextValue(){if(!isNaN(this.nextVal)){const r=this.nextVal;return this.nextVal=NaN,r}let e,t,n=!1;for(;!n;){let r,i,o;do r=2*this.random()-1,i=2*this.random()-1,o=r*r+i*i;while(o>=1||o===0);const a=Math.sqrt(-2*Math.log(o)/o);e=this.mean+this.stdDev*r*a,t=this.mean+this.stdDev*i*a,(!this.truncated||this.isValidTruncated(e))&&(n=!0)}return(!this.truncated||this.isValidTruncated(t))&&(this.nextVal=this.convertValue(t)),this.convertValue(e)}convertValue(e){return this.dtype==null||this.dtype==="float32"?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}}class By{constructor(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;const i=r||Math.random();this.randu=Wp.alea(i.toString()),this.randn=new zs(0,1,n,!1,this.randu()),e<1?this.d=e+2/3:this.d=e-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let e,t,n,r,i,o;for(;;){do r=this.randn.nextValue(),o=1+this.c*r;while(o<=0);if(o*=o*o,e=r*r,t=1-.331*e*e,n=.5*e+this.d*(1-o+Math.log(o)),i=this.randu(),i<t||Math.log(i)<n)break}return o=1/this.beta*this.d*o,this.alpha<1&&(o*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(o)}convertValue(e){return this.dtype==="float32"?e:Math.round(e)}}class Py{constructor(e=0,t=1,n,r){if(this.canReturnFloat=()=>this.dtype==null||this.dtype==="float32",this.min=e,this.range=t-e,this.dtype=n,r==null&&(r=Math.random()),typeof r=="number"&&(r=r.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=Wp.alea(r)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}function bC(e,t,n=1,r="float32",i){if(n==null&&(n=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error(`Unsupported data type ${r}`);const o=new By(t,n,r,i),a=ke(e,r);for(let s=0;s<a.values.length;s++)a.values[s]=o.nextValue();return a.toTensor()}const Ol=d({randomGamma_:bC});function wC(e,t=0,n=1,r,i){if(r!=null&&r==="bool")throw new Error(`Unsupported data type ${r}`);const o=new zs(t,n,r,!1,i),a=ke(e,r);for(let s=0;s<a.values.length;s++)a.values[s]=o.nextValue();return a.toTensor()}const El=d({randomNormal_:wC});function yC(e,t=0,n=1,r="float32",i){const o=ke(e,r),a=new Py(t,n,null,i);for(let s=0;s<o.values.length;s++)o.values[s]=a.nextValue();return o.toTensor()}const Li=d({randomUniform_:yC});function ht(e,t){lt(e);const n=Fe(e,t);if(n.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");const r=null;return ze(e,r,n,t)}function vr(e,t,n=1,r="float32"){if(n===0)throw new Error("Cannot have a step of zero");const i=()=>{const a=e===t,s=e<t&&n<0,c=t<e&&n>1;if(a||s||c)return Ue([0],r);const p=Math.abs(Math.ceil((t-e)/n)),l=Pt(p,r);t<e&&n===1&&(n=-1),l[0]=e;for(let u=1;u<l.length;u++)l[u]=l[u-1]+n;return ht(l,r)},o={start:e,stop:t,step:n,dtype:r};return g.runKernelFunc(i,{},null,Sh,o)}function xC(e){const t=h(e,"x","reciprocal"),n={x:t};return g.runKernelFunc((r,i)=>{const o=r.reciprocal(t);return i([t]),o},n,null,jo)}const Cl=d({reciprocal_:xC});function LC(e){const t=h(e,"x","relu"),n=(i,o)=>(o([t]),t.dtype==="bool"?R(t,"int32"):i.relu(t)),r={x
Manifest JSON has weights with names: ${s.join(", ")}.`)}const c=i.reduce((b,y,w)=>(y&&b.push(w),b),[]),p=[];c.forEach(b=>{t[b].paths.forEach(y=>{const w=n+(n.endsWith("/")?"":"/")+y;p.push(w)})});const l=await e(p),u={};let m=0;return c.forEach(b=>{const y=t[b].paths.length;let w=0;for(let N=0;N<y;N++)w+=l[m+N].byteLength;const L=new ArrayBuffer(w),T=new Uint8Array(L);let A=0;for(let N=0;N<y;N++){const C=new Uint8Array(l[m+N]);T.set(C,A),A+=C.byteLength}const _=o[b];_.forEach(N=>{const C=L.slice(N.groupOffset,N.groupOffset+N.sizeBytes),F=Vm(C,[N.manifestEntry]);for(const E in F)u[E]=F[E]}),m+=y}),u}}const EO="application/octet-stream",OO="application/json";class Zm{constructor(e,t){if(this.DEFAULT_METHOD="POST",t==null&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,t.fetchFunc!=null?(f(typeof t.fetchFunc=="function",()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"),this.fetch=t.fetchFunc):this.fetch=se().platform.fetch,f(e!=null&&e.length>0,()=>"URL path for http must not be null, undefined or empty."),Array.isArray(e)&&f(e.length===2,()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`),this.path=e,t.requestInit!=null&&t.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");const t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData();const n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,userDefinedMetadata:e.userDefinedMetadata,weightsManifest:n};t.body.append("model.json",new Blob([JSON.stringify(r)],{type:OO}),"model.json"),e.weightData!=null&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:EO}),"model.weights.bin");const i=await this.fetch(this.path,t);if(i.ok)return{modelArtifactsInfo:Js(e),responses:[i]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${i.status}.`)}async load(){const e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code ${e.status}. Please verify this URL points to the model JSON of the model to load.`);let t;try{t=await e.json()}catch(l){let u=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?u+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":u+=" Please make sure the server is serving valid JSON for this request.",new Error(u)}const n=t.modelTopology,r=t.weightsManifest,i=t.generatedBy,o=t.convertedBy,a=t.format,s=t.userDefinedMetadata;if(n==null&&r==null)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);let c,p;if(r!=null){const l=await this.loadWeights(r);[c,p]=l}return{modelTopology:n,weightSpecs:c,weightData:p,userDefinedMetadata:s,generatedBy:i,convertedBy:o,format:a}}async loadWeights(e){const t=Array.isArray(this.path)?this.path[1]:this.path,[n,r]=kO(t),i=this.weightPathPrefix||n,o=[];for(const c of e)o.push(...c.weights);const a=[];e.forEach(c=>{c.paths.forEach(p=>{a.push(i+p+r)})});const s=await Xm(a,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[o,Ks(s)]}}Zm.URL_SCHEME_REGEX=/^https?:\/\//;function kO(e){const t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),r=e.substring(0,t),i=n>t?e.substring(n):"";return[r+"/",i]}function Qm(e){return e.match(Zm.URL_SCHEME_REGEX)!=null}const Nx=(e,t)=>{if(typeof fetch=="undefined"&&(t==null||t.f
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
2020-08-18 14:04:15 +02:00
/**
* @license
* Copyright 2017 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
/**
* @license
* Copyright 2018 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
/**
* @license
* Copyright 2019 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
/**
* @license
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
/**
* @license
* Copyright 2020 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
/** @license See the LICENSE file. */
//# sourceMappingURL=face-api.min.js.map