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

100 lines
310 KiB
JavaScript
Raw Normal View History

2020-08-18 19:00:59 +02:00
var faceapi=(()=>{var Fs=Object.defineProperty,$b=Object.prototype.hasOwnProperty,ke=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),uu=e=>Fs(e,"__esModule",{value:!0}),me=(e,t)=>{uu(e);for(var n in t)Fs(e,n,{get:t[n],enumerable:!0})},T=(e,t)=>{if(uu(e),typeof t=="object"||typeof t=="function")for(let n in t)!$b.call(e,n)&&n!=="default"&&Fs(e,n,{get:()=>t[n],enumerable:!0});return e},ee=e=>e&&e.__esModule?e:T(Fs({},"default",{value:e,enumerable:!0}),e);var mu=ke((du,Ka)=>{(function(e,t,n){function r(s){var c=this,p=a();c.next=function(){var l=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=l-(c.c=l|0)},c.c=1,c.s0=p(" "),c.s1=p(" "),c.s2=p(" "),c.s0-=p(s),c.s0<0&&(c.s0+=1),c.s1-=p(s),c.s1<0&&(c.s1+=1),c.s2-=p(s),c.s2<0&&(c.s2+=1),p=null}function o(s,c){return c.c=s.c,c.s0=s.s0,c.s1=s.s1,c.s2=s.s2,c}function i(s,c){var p=new r(s),l=c&&c.state,h=p.next;return h.int32=function(){return p.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,l&&(typeof l=="object"&&o(l,p),h.state=function(){return o(p,{})}),h}function a(){var s=4022871197,c=function(p){p=p.toString();for(var l=0;l<p.length;l++){s+=p.charCodeAt(l);var h=.02519603282416938*s;s=h>>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return c}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.alea=i})(du,typeof Ka=="object"&&Ka,typeof define=="function"&&define)});var gu=ke((fu,Ja)=>{(function(e,t,n){function r(a){var s=this,c="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var l=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^l^l>>>8},a===(a|0)?s.x=a:c+=a;for(var p=0;p<c.length+64;p++)s.x^=c.charCodeAt(p)|0,s.next()}function o(a,s){return s.x=a.x,s.y=a.y,s.z=a.z,s.w=a.w,s}function i(a,s){var c=new r(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,m=(c.next()>>>0)/4294967296,b=(h+m)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(typeof p=="object"&&o(p,c),l.state=function(){return o(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xor128=i})(fu,typeof Ja=="object"&&Ja,typeof define=="function"&&define)});var wu=ke((bu,Xa)=>{(function(e,t,n){function r(a){var s=this,c="";s.next=function(){var l=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(l^l<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,a===(a|0)?s.x=a:c+=a;for(var p=0;p<c.length+64;p++)s.x^=c.charCodeAt(p)|0,p==c.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function o(a,s){return s.x=a.x,s.y=a.y,s.z=a.z,s.w=a.w,s.v=a.v,s.d=a.d,s}function i(a,s){var c=new r(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,m=(c.next()>>>0)/4294967296,b=(h+m)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(typeof p=="object"&&o(p,c),l.state=function(){return o(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xorwow=i})(bu,typeof Xa=="object"&&Xa,typeof define=="function"&&define)});var xu=ke((yu,Za)=>{(function(e,t,n){function r(a){var s=this;s.next=function(){var p=s.x,l=s.i,h,m,b;return h=p[l],h^=h>>>7,m=h^h<<24,h=p[l+1&7],m^=h^h>>>10,h=p[l+3&7],m^=h^h>>>3,h=p[l+4&7],m^=h^h<<7,h=p[l+7&7],h=h^h<<13,m^=h^h<<9,p[l]=m,s.i=l+1&7,m};function c(p,l){var h,m,b=[];if(l===(l|0))m=b[0]=l;else for(l=""+l,h=0;h<l.length;++h)b[h&7]=b[h&7]<<15^l.charCodeAt(h)+b[h+1&7]<<13;for(;b.length<8;)b.push(0);for(h=0;h<8&&b[h]===0;++h);for(h==8?m=b[7]=-1:m=b[h],p.x=b,p.i=0,h=256;h>0;--h)p.next()}c(s,a)}function o(a,s){return s.x=a.x.slice(),s.i=a.i,s}function i(a,s){a==null&&(a=+new Date());var c=new r(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,m=(c.next()>>>0)/4294967296,b=(h+m)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(p.x&&o(p,c),l.state=function(){return o(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xorshift7=i})(yu,typeof Za=="object"&&Za,typeof define=="function"&&define)});var Su=ke((Lu,Q
2020-08-18 14:04:15 +02:00
`)),c.join(`
`)}function Xw(e,t,n,r){const o=te(t),i=r[r.length-1],a=new Array(i).fill(0),s=t.length,c=n==="complex64"?Xi(e):e;if(s>1)for(let p=0;p<o/i;p++){const l=p*i;for(let h=0;h<i;h++)a[h]=Math.max(a[h],Ji(c[l+h],0,n).length)}return a}function Ji(e,t,n){let r;return Array.isArray(e)?r=`${parseFloat(e[0].toFixed(Dp))} + ${parseFloat(e[1].toFixed(Dp))}j`:Tt(e)?r=`'${e}'`:n==="bool"?r=cd(e):r=parseFloat(e.toFixed(Dp)).toString(),Rn(r,t)}function cd(e){return e===0?"false":"true"}function la(e,t,n,r,o,i=!0){const a=n==="complex64"?2:1,s=t[0],c=t.length;if(c===0){if(n==="complex64"){const w=Xi(e);return[Ji(w[0],0,n)]}return n==="bool"?[cd(e[0])]:[e[0].toString()]}if(c===1){if(s>sd){const L=Ki*a;let v=Array.from(e.slice(0,L)),A=Array.from(e.slice((s-Ki)*a,s*a));return n==="complex64"&&(v=Xi(v),A=Xi(A)),["["+v.map((R,N)=>Ji(R,o[N],n)).join(", ")+", ..., "+A.map((R,N)=>Ji(R,o[s-Ki+N],n)).join(", ")+"]"]}const w=n==="complex64"?Xi(e):Array.from(e);return["["+w.map((L,v)=>Ji(L,o[v],n)).join(", ")+"]"]}const p=t.slice(1),l=r.slice(1),h=r[0]*a,m=[];if(s>sd){for(let w=0;w<Ki;w++){const L=w*h,v=L+h;m.push(...la(e.slice(L,v),p,n,l,o,!1))}m.push("...");for(let w=s-Ki;w<s;w++){const L=w*h,v=L+h;m.push(...la(e.slice(L,v),p,n,l,o,w===s-1))}}else for(let w=0;w<s;w++){const L=w*h,v=L+h;m.push(...la(e.slice(L,v),p,n,l,o,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=`,
`;for(let w=2;w<c;w++)y+=`
`;return m[m.length-1]=" "+m[m.length-1]+"]"+(i?"":y),m}function Xi(e){const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}class Sr{constructor(e,t,n){if(this.dtype=t,this.shape=e.slice(),this.size=te(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||Rp(t,this.size),this.strides=Ut(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 o=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(o)}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 Bt().makeTensor(this.values,this.shape,this.dtype)}}let Bt=null,vr=null,Zw=null;function pd(e){Bt=e}function ld(e){vr=e}function hd(e){Zw=e}class ne{constructor(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=te(e),this.strides=Ut(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 vr.buffer(this.shape,this.dtype,e)}bufferSync(){return vr.buffer(this.shape,this.dtype,this.dataSync())}async array(){const e=await this.data();return Cn(this.shape,e)}arraySync(){return Cn(this.shape,this.dataSync())}async data(){this.throwIfDisposed();const e=Bt().read(this.dataId);if(this.dtype==="string"){const t=await e;try{return t.map(n=>pa(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=Bt().readSync(this.dataId);if(this.dtype==="string")try{return e.map(t=>pa(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 Bt().read(this.dataId);return this.dtype==="string"?e:new Uint8Array(e.buffer)}dispose(){if(this.isDisposed)return;Bt().disposeTensor(this),this.isDisposedInternal=!0}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return vr.print(this,e)}clone(){return this.throwIfDisposed(),vr.clone(this)}toString(e=!1){const t=this.dataSync();return ad(t,this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),vr.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),Bt().makeVariable(this,e,t,n)}}Object.defineProperty(ne,Symbol.hasInstance,{value:e=>!!e&&e.dataId!=null&&e.shape!=null&&e.dtype!=null});class $t extends ne{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(!Se(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);Bt().disposeTensor(this),this.dataId=e.dataId,Bt().incRef(this,null)}dispose(){Bt().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty($t,Symbol.hasInstance,{value:e=>e instanceof ne&&e.assign!=null&&e.assign instanceof Function});var Fp;(function(e){e.R0="R0",e.R1="R1",e.
with dtype ${p.dtype}. `)});const r=z(t,n[0].shape)[0],o=al(n.map(p=>p.shape),r);if(te(o)===0)return Ye([],o);if(n=n.filter(p=>p.size>0),n.length===1)return n[0];const i=n.map(p=>p.shape);sl(i,r);const a=(p,l)=>{const h=p.concat(n,r);return l(n),h},s=n,c={axis:t};return g.runKernelFunc(a,s,null,To,c)}const Q=d({concat_:Jy});function Xy(e,t,n=!1,r=!1){let o=u(e,"a","matMul"),i=u(t,"b","matMul");[o,i]=K(o,i),f(o.rank>=2&&i.rank>=2&&o.rank===i.rank,()=>`Error in matMul: inputs must have the same rank of at least 2, got ranks ${o.rank} and ${i.rank}.`);const a=n?o.shape[o.rank-2]:o.shape[o.rank-1],s=r?i.shape[i.rank-1]:i.shape[i.rank-2],c=n?o.shape[o.rank-1]:o.shape[o.rank-2],p=r?i.shape[i.rank-2]:i.shape[i.rank-1],l=o.shape.slice(0,-2),h=i.shape.slice(0,-2),m=te(l),b=te(h);f(Se(l,h),()=>`Error in matMul: outer dimensions (${l}) and (${h}) of Tensors with shapes ${o.shape} and ${i.shape} must match.`),f(a===s,()=>`Error in matMul: inner shapes (${a}) and (${s}) of Tensors with shapes ${o.shape} and ${i.shape} and transposeA=${n} and transposeB=${r} must match.`);const y=o.shape.slice(0,-2).concat([c,p]),w=n?x(o,[m,a,c]):x(o,[m,c,a]),L=r?x(i,[b,p,s]):x(i,[b,s,p]),v=(O,M)=>(M([w,L]),O.batchMatMul(w,L,n,r)),A={a:w,b:L},R={transposeA:n,transposeB:r},N=g.runKernelFunc(v,A,null,xo,R);return x(N,y)}const Y=d({matMul_:Xy});function Zy(e,t){let n=u(e,"a","mul"),r=u(t,"b","mul");[n,r]=K(n,r);const o=(a,s)=>{const c=a.multiply(n,r);return s([n,r]),c},i={a:n,b:r};return g.runKernelFunc(o,i,null,ii)}const S=d({mul_:Zy});function Qy(e){const t=u(e,"x","sigmoid"),n={x:t};return g.runKernelFunc((r,o)=>{const i=r.sigmoid(t);return o([i]),i},n,null,Ni)}const Nt=d({sigmoid_:Qy});const yd={};me(yd,{assertParamsValid:()=>cl,computeFlatOffset:()=>tx,computeOutShape:()=>pl,isSliceContinous:()=>ex,maskToAxes:()=>es,parseSliceParams:()=>ts,startForAxis:()=>ml,startIndicesWithElidedDims:()=>hl,stopForAxis:()=>fl,stopIndicesWithElidedDims:()=>ul,stridesForAxis:()=>dl,stridesWithElidedDims:()=>ll});function cl(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 es(e){const t=[];let n=0;for(;e>0;)e&1&&t.push(n),e/=2,n++;return t}function pl(e,t,n){const r=[];for(let o=0;o<e.length;o++)r[o]=Math.ceil((t[o]-e[o])/n[o]);return r}function ll(e,t,n,r){const o=[...e];for(let i=o.length;i<r.length;i++)o.push(1);for(let i=0;i<n;i++)i===0?o[t]=1:(o.splice(t,0,1),o.pop());return o}function xd(e,t,n){return n<=e?n:n-(t-1)}function Ld(e,t){const n=[];for(let r=0;r<e;r++)n.push(t+r);return n}function hl(e,t,n,r,o){const i=[...o],a=Ld(n,t);for(let s=0;s<i.length;s++)if(a.indexOf(s)>-1)i[s]=0;else{const c=xd(t,n,s);let p=r[c];e&1<<c&&(p=0),i[s]=p}return i}function ul(e,t,n,r,o){const i=[...o],a=Ld(n,t);for(let s=0;s<i.length;s++)if(a.indexOf(s)>-1)i[s]=Number.MAX_SAFE_INTEGER;else{const c=xd(t,n,s);let p=r[c];e&1<<c&&(p=Number.MAX_SAFE_INTEGER),i[s]=p}for(let s=0;s<i.length;s++){const c=o[s];i[s]<0&&(i[s]+=c),i[s]=wr(0,i[s],o[s])}return i}function dl(e,t,n){let r=e[t];return(n&1<<t||r==null)&&(r=1),r}function ml(e,t,n,r,o,i){let a=t[o];const s=n[o]||1;(e&1<<o||i&1<<o||a==null)&&(s>0?a=Number.MIN_SAFE_INTEGER:a=Number.MAX_SAFE_INTEGER);const c=r[o];return a<0&&(a+=c),a=wr(0,a,c-1),a}function fl(e,t,n,r,o,i){let a=t[o];const s=n[o]||1;(e&1<<o||i&1<<o||a==null)&&(s>0?a=Number.MAX_SAFE_INTEGER:a=Number.MIN_SAFE_INTEGER);const c=r[o];return a<0&&(a+=c),s>0?a=wr(0,a,c):a=wr(-1,a,c-1),a}function ex(e,t,n){let r=n.length;for(let o=0;o<n.length;o++)if(n[o]>1){r=o;break}for(let o=r+1;o<n.length;o++)if(t[o]>0||n[o]!==e[o])return!1;return!0}function tx(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 ts(e,t,n){let r;typeof t=="number"?r=[t,...new Array(e
${o} and ${t} for depthToSpace with input shape
${r.shape}`),f(i*t>=0,()=>`Negative dimension size caused by overflow when multiplying
${i} 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,Wc,p)}const El=d({depthToSpace_:Cx});function Ex(e,t,n,r,o="NHWC",i=[1,1],a){const s=u(e,"x","depthwiseConv2d"),c=u(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(X(r),()=>`Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode ${a} but got pad ${r}.`);const h=(w,L)=>{i==null&&(i=[1,1]),f(pe(n,i),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`);const v=$e(p.shape,c.shape,n,i,r,a,!0),A=w.depthwiseConv2D(p,c,v);return L([p,c]),A},m={x:p,filter:c},b={strides:n,pad:r,dataFormat:o,dilations:i,dimRoundingMode:a},y=g.runKernelFunc(h,m,null,ko,b);return l?x(y,[y.shape[1],y.shape[2],y.shape[3]]):y}const Dn=d({depthwiseConv2d_:Ex});function Ox(e){const t=u(e,"x","diag"),n=o=>{const i=x(t,[t.size]),a=o.diag(i),s=[...e.shape,...e.shape];return x(a,s)},r={x:t};return g.runKernelFunc(n,r,null,Gc)}const Ol=d({diag_:Ox});function kx(e,t,n,r,o=[1,1],i="NHWC"){const a=u(e,"x","dilation2d"),s=u(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(i==="NHWC",()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${i}`);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},h={strides:n,pad:r,dilations:o},m=g.runKernel(_o,l,h);return p?x(m,[m.shape[1],m.shape[2],m.shape[3]]):m}const kl=d({dilation2d_:kx});function _x(e,t){let n=u(e,"a","floorDiv"),r=u(t,"b","floorDiv");[n,r]=K(n,r);const o=(a,s)=>{const c=a.floorDiv(n,r);return s([n,r]),c},i={a:n,b:r};return g.runKernelFunc(o,i,null,$o)}const os=d({floorDiv_:_x});function Dx(e,t){let n=u(e,"a","div"),r=u(t,"b","div");if([n,r]=K(n,r),n.dtype==="int32"&&r.dtype==="int32")return os(n,r);const o=(s,c)=>{const p=s.realDivide(n,r);return c([n,r]),p},i={a:n,b:r},a={};return g.runKernelFunc(o,i,null,Do,a)}const U=d({div_:Dx});function Fx(e,t){const n=e.length,r=[];for(let o=0;o<n;o++){const i=n-1-o,a=e[i]||1,s=t[t.length-1-o]||1;s>1&&a===1&&r.unshift(i)}return r}function ae(e,t){const n=[];for(let r=0;r<t.length;r++){const o=e[e.length-r-1],i=t.length-r-1,a=t[i];(o==null||o===1&&a>1)&&n.unshift(i)}return n}function q(e,t){const n=[],r=Math.max(e.length,t.length);for(let o=0;o<r;o++){let i=e[e.length-o-1];i==null&&(i=1);let a=t[t.length-o-1];if(a==null&&(a=1),i===1)n.unshift(a);else if(a===1)n.unshift(i);else if(i!==a){const s=`Operands could not be broadcast together with shapes ${e} and ${t}.`;throw Error(s)}else n.unshift(i)}return n}function Mx(e,t){let n=u(e,"a","equal"),r=u(t,"b","equal");[n,r]=K(n,r),q(n.shape,r.shape);const o=a=>a.equal(n,r),i={a:n,b:r};return g.runKernelFunc(o,i,null,Hc)}const Xt=d({equal_:Mx});function Ux(e,t,n){const r=u(t,"a","where"),o=u(n,"b","where"),i=u(e,"condition","where","bool"),a=q(r.shape,o.shape),s=Nr(r,a),c=Nr(o,a);i.rank===1&&f(i.shape[0]===r.shape[0],()=>"The first dimension of `a` must match the size of `condition`."),i.rank!==1&&P(i.shape,c.shape,"Error in where: ");const p=(h,m)=>{const b=h.select(i,s,c);return m([i]),b},l={condition:i,t:s,e:c};return g.runKernelFunc(p,l,null,Li)}const Ee=d({where_:Ux});function Wx(e){const t=u(e,"x","zerosLike"),n={x:t};return g.runKernelFunc(r=>r.zerosLike(t),n,null,ji)}const B=d({zerosLike_:Wx});function Bx(e,t){let n=u(e,"a","div"),r=u(t,"b","div");
rank ${i.rank}.`),f(X(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let a=i,s=!1;i.rank===3&&(s=!0,a=x(i,[1,i.shape[0],i.shape[1],i.shape[2]]));const c=(m,b)=>{const y=m.localResponseNormalization4D(a,t,n,r,o);return b([a,y]),y},p={x:a},l={depthRadius:t,bias:n,alpha:r,beta:o},h=g.runKernelFunc(c,p,null,Xo,l);return s?x(h,[h.shape[1],h.shape[2],h.shape[3]]):h}const Pl=d({localResponseNormalization_:mL});function fL(e){const t=u(e,"x","log"),n={x:t};return g.runKernelFunc((r,o)=>{const i=r.log(t);return o([t]),i},n,null,Vo)}const wt=d({log_:fL});function gL(e){const t=u(e,"x","log1p"),n={x:t};return g.runKernelFunc((r,o)=>{const i=r.log1p(t);return o([t]),i},n,null,Ko)}const cs=d({log1p_:gL});function bL(e){return f(Mt(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{const r=u(t,"x","tf.grad",null),o=n!=null?u(n,"dy","tf.grad"):null;return g.tidy(()=>{const{value:i,grads:a}=g.gradients(()=>e(r),[r],o);return o!=null&&P(i.shape,o.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),fa(a),a[0]})}}function wL(e){return f(Mt(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=Vt(t,"args","tf.grads",null),o=n!=null?u(n,"dy","tf.grads"):null;return g.tidy(()=>{const{value:i,grads:a}=g.gradients(()=>e(...r),r,o);return o!=null&&P(i.shape,o.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),fa(a),a})}}function yL(e){return f(Mt(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{f(t instanceof ne,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),f(n==null||n instanceof ne,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");const{grads:r,value:o}=g.gradients(()=>e(t),[t],n);return fa(r),{grad:r[0],value:o}}}function xL(e){return f(Mt(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{f(Array.isArray(t)&&t.every(o=>o instanceof ne),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),f(n==null||n instanceof ne,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");const r=g.gradients(()=>e(...t),t,n);return n!=null&&P(r.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),fa(r.grads),r}}function ql(e,t){f(Mt(e),()=>"The f passed in variableGrads(f) must be a function"),f(t==null||Array.isArray(t)&&t.every(p=>p instanceof $t),()=>"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,o=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 ${o} variables is trainable.`);const i=!0,{value:a,grads:s}=g.gradients(e,t,null,i);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 Je(e){return g.customGrad(e)}function fa(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 LL(e){const t=u(e,"x","neg"),n={x:t};return g.runKernelFunc(r=>r.neg(t),n,null,si)}const re=d({neg_:LL});function SL(e){const t=u(e,"x","softplus"),n={x:t};return g.runKernelFunc((r,o)=>{const i=r.softplus(t);return o([t]),i},n,null,Ri)}const ps=d({softplus_:SL});function vL(e){const t=u(e,"x","logSigmoid"),n=Je(r=>{const o=re(ps(re(r))),i=a=>{const s=S(a,Nt(re(r)));return s};return{value:o,gradFunc:i}});return n(t)}const Hl=d({logSigmoid_:vL});function IL(e,t=null,n=!1){const r=u(e,"x","max"),o=(s,c)=>{const p=z(t,r.shape);let l=p;const h=fe(l,r.rank);let m=r;h!=null&&(m=Z(r,h),l=De(l.length,m.rank));const b=s.max(m,l);h!=null&&m.dispose();let y=b;if(n){const w=we(y.shape,z(t,r.shape));y=x(y,w),b.dispose()}return c([r,y]),y},i={x:r},a={reductionIndices:t,keepDims:n};return g.runKernelFunc(o,i,null,Zo,a)}const mt=d({max_:IL});function TL(e,t){let n=u(e,"a","sub"),r=u(t,"b","sub");[n,r]=K(n,r);const o=(a,s)=>{const c=a.subtract(n,r);return s([n,r]),c},i={a:n,b:r};return g.runKernelFunc(o,i,null,Fi)}const _=d({sub_:TL});function AL(e,t=null,n=!1){let r=u(e,"x","sum");r.dtype==="bool"&&(r=E(r,"int32"));const o=(s,c)=>{c([r]);const p=z(t,r.shape),l=fe(p,r.rank);let h=p,m=r;l!=null&&(m=Z(r,l),h=De(h.length,r.rank));let b=s.sum(m,h);if(n){const y=we(b.shape,p);b=x(b,y)}return b},i={x:r},a={axis:t,keepDims:n};return g.runKernelFunc(o,i,null,Ei,a)}const W=d({sum_:AL});function NL(e,t=-1){const n=u(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=mt(e,t,!0),l=_(e,p),h=_(E(l,"float32"),wt(W(Oe(l),t,c)));return s([h]),h},o={logits:n},i={axis:t};return g.runKernelFunc(r,o,null,Jo,i)}const zl=d({logSoftmax_:NL});function RL(e,t=null,n=!1){const r=u(e,"x","logSumExp"),o=z(t,r.shape),i=mt(r,o,!0),a=_(r,i),s=Oe(a),c=W(s,o),p=wt(c),l=C(x(i,p.shape),p);if(n){const h=we(l.shape,o);return x(l,h)}return l}const ls=d({logSumExp_:RL});function CL(e,t){const n=u(e,"a","logicalAnd","bool"),r=u(t,"b","logicalAnd","bool");q(n.shape,r.shape);const o={a:n,b:r};return g.runKernelFunc(i=>i.logicalAnd(n,r),o,null,np)}const yt=d({logicalAnd_:CL});function EL(e){const t=u(e,"x","logicalNot","bool"),n={x:t};return g.runKernelFunc(r=>r.logicalNot(t),n,null,rp)}const Bn=d({logicalNot_:EL});function OL(e,t){const n=u(e,"a","logicalOr","bool"),r=u(t,"b","logicalOr","bool");q(n.shape,r.shape);const o={a:n,b:r};return g.runKernelFunc(i=>i.logicalOr(n,r),o,null,op)}const hs=d({logicalOr_:OL});function kL(e,t){const n=u(e,"a","logicalXor","bool"),r=u(t,"b","logicalXor","bool");return q(n.shape,r.shape),yt(hs(e,t),Bn(yt(e,t)))}const Yl=d({logicalXor_:kL});function _L(e,t,n,r,o){const i=u(e,"x","maxPool"),a=1;let s=i,c=!1;i.rank===3&&(c=!0,s=x(i,[1,i.shape[0],i.shape[1],i.shape[2]])),f(s.rank===4,()=>`Error in maxPool: input must be rank 4 but got rank ${s.rank}.`),f(pe(n,a),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),o!=null&&f(X(r),()=>`Error in maxPool: pad must be an integer when using, dimRoundingMode ${o} but got pad ${r}.`);const p=(b,y)=>{const w=At(s.shape,t,n,1,r,o);let L;return w.filterWidth===1&&w.filterHeight===1&&Se(w.inShape,w.outShape)?L=s.clone():L=b.maxPool(s,w),y([s,L]),L},l={x:s},h={filterSize:t,strides:n,pad:r,dimRoundingMode:o},m=g.runKernelFunc(p,l,null,ei,h);return c?x(m,[m.shape[1],m.shape[2],m.shape[3]]):m}const Ie=d({maxPool_:_L});function DL(e,t=[1,1,1],n,r,o,i="NDHWC",a){a==null?a=[1,1,1]:xe("dilations is deprecated, this field will be gone in v3.0.0.");const s=u(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(i==="NDHWC",()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${i}`),f(pe(n,a),()=>`Error in maxPool3d: Either strides or dilations must be 1. Got strides ${n} and d
Actual: ${o}.
Expected: ${i}.`);for(let a=0;a<i.length;++a){const s=o[a],c=i[a];if(!n(s,c))throw new Error(`Arrays differ: actual[${a}] = ${s}, expected[${a}] = ${c}.
Actual: ${o}.
Expected: ${i}.`)}}function pS(e,t){e().then(()=>t.fail(),()=>t())}function lS(e,t){const n=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Tt(e)||Tt(e[0])||Tt(t)||Tt(t[0])?ph(e,n,(r,o)=>r==o):ph(e,t,(r,o)=>lh(r,o,0))}function hS(e,t,n){if(n==null&&(n=ch()),!lh(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`)}function lh(e,t,n){return!isFinite(e)&&!isFinite(t)?!0:!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function uS(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 dS(e,t){expect(new Float32Array(e)).toEqual(new Float32Array(t))}const ba=ee(Ru());class ms{constructor(e,t,n,r,o){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 i=o||Math.random();this.random=ba.alea(i.toString())}nextValue(){if(!isNaN(this.nextVal)){const r=this.nextVal;return this.nextVal=NaN,r}let e,t,n=!1;for(;!n;){let r,o,i;do r=2*this.random()-1,o=2*this.random()-1,i=r*r+o*o;while(i>=1||i===0);const a=Math.sqrt(-2*Math.log(i)/i);e=this.mean+this.stdDev*r*a,t=this.mean+this.stdDev*o*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 Ad{constructor(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;const o=r||Math.random();this.randu=ba.alea(o.toString()),this.randn=new ms(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,o,i;for(;;){do r=this.randn.nextValue(),i=1+this.c*r;while(i<=0);if(i*=i*i,e=r*r,t=1-.331*e*e,n=.5*e+this.d*(1-i+Math.log(i)),o=this.randu(),o<t||Math.log(o)<n)break}return i=1/this.beta*this.d*i,this.alpha<1&&(i*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(i)}convertValue(e){return this.dtype==="float32"?e:Math.round(e)}}class Nd{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=ba.alea(r)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}function mS(e,t,n=1,r="float32",o){if(n==null&&(n=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error(`Unsupported data type ${r}`);const i=new Ad(t,n,r,o),a=Me(e,r);for(let s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}const hh=d({randomGamma_:mS});function fS(e,t=0,n=1,r,o){if(r!=null&&r==="bool")throw new Error(`Unsupported data type ${r}`);const i=new ms(t,n,r,!1,o),a=Me(e,r);for(let s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}const uh=d({randomNormal_:fS});function gS(e,t=0,n=1,r="float32",o){const i=Me(e,r),a=new Nd(t,n,null,o);for(let s=0;s<i.values.length;s++)i.values[s]=a.nextValue();return i.toTensor()}const fs=d({randomUniform_:gS});function ge(e,t){pt(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 Er(e,t,n=1,r="float32"){if(n===0)throw new Error("Cannot have a step of zero");const o=()=>{const a=e===t,s=e<t&&n<0,c=t<e&&n>1;if(a||s||c)return Re([0],r);const p=Math.abs(Math.ceil((t-e)/n)),l=Wt(p,r);t<e&&n===1&&(n=-1),l[0]=e;for(let h=1;h<l.length;h++)l[h]=l[h-1]+n;return ge(l,r)},i={start:e,stop:t,step:n,dtype:r};return g.runKernelFunc(o,{},null,mp,i)}function bS(e){const t=u(e,"x","reciprocal"),n={x:t};return g.runKernelFunc((r,o)=>{const i=r.reciprocal(t);return o([t]),i},n,null,ui)}const dh=d({reciprocal_:bS});function wS(e){const t=u(e,"x","relu"),n=(o,i)=>(i([t]),t.dtype==="bool"?E(t,"int32"):o.relu(t)),r={x
2020-08-18 19:00:59 +02:00
Manifest JSON has weights with names: ${s.join(", ")}.`)}const c=o.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),h={};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),v=new Uint8Array(L);let A=0;for(let N=0;N<y;N++){const O=new Uint8Array(l[m+N]);v.set(O,A),A+=O.byteLength}const R=i[b];R.forEach(N=>{const O=L.slice(N.groupOffset,N.groupOffset+N.sizeBytes),M=Uh(O,[N.manifestEntry]);for(const D in M)h[D]=M[D]}),m+=y}),h}}const RI="application/octet-stream",CI="application/json";class Gh{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=ce().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:CI}),"model.json"),e.weightData!=null&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:RI}),"model.weights.bin");const o=await this.fetch(this.path,t);if(o.ok)return{modelArtifactsInfo:As(e),responses:[o]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${o.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 h=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?h+=" 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.":h+=" Please make sure the server is serving valid JSON for this request.",new Error(h)}const n=t.modelTopology,r=t.weightsManifest,o=t.generatedBy,i=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:o,convertedBy:i,format:a}}async loadWeights(e){const t=Array.isArray(this.path)?this.path[1]:this.path,[n,r]=EI(t),o=this.weightPathPrefix||n,i=[];for(const c of e)i.push(...c.weights);const a=[];e.forEach(c=>{c.paths.forEach(p=>{a.push(o+p+r)})});const s=await $h(a,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[i,Ts(s)]}}Gh.URL_SCHEME_REGEX=/^https?:\/\//;function EI(e){const t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),r=e.substring(0,t),o=n>t?e.substring(n):"";return[r+"/",o]}function jh(e){return e.match(Gh.URL_SCHEME_REGEX)!=null}const $m=(e,t)=>{if(typeof fetch=="undefined"&&(t==null||t.f
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