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

100 lines
321 KiB
JavaScript
Raw Normal View History

2020-09-08 18:45:03 +02:00
var faceapi=(()=>{var zs=Object.defineProperty,Jb=Object.prototype.hasOwnProperty,Ys=Object.assign,At=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),fu=e=>zs(e,"__esModule",{value:!0}),Re=(e,t)=>{fu(e);for(var n in t)zs(e,n,{get:t[n],enumerable:!0})},Xb=(e,t)=>{if(fu(e),typeof t=="object"||typeof t=="function")for(let n in t)!Jb.call(e,n)&&n!=="default"&&zs(e,n,{get:()=>t[n],enumerable:!0});return e},gu=e=>e&&e.__esModule?e:Xb(zs({},"default",{value:e,enumerable:!0}),e);var wu=At((bu,fc)=>{(function(e,t,n){function o(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 r(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 o(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"&&r(l,p),h.state=function(){return r(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})(bu,typeof fc=="object"&&fc,typeof define=="function"&&define)});var yu=At((xu,gc)=>{(function(e,t,n){function o(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 r(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 o(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,b=(h+d)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(typeof p=="object"&&r(p,c),l.state=function(){return r(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xor128=i})(xu,typeof gc=="object"&&gc,typeof define=="function"&&define)});var vu=At((Lu,bc)=>{(function(e,t,n){function o(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 r(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 o(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,b=(h+d)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(typeof p=="object"&&r(p,c),l.state=function(){return r(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xorwow=i})(Lu,typeof bc=="object"&&bc,typeof define=="function"&&define)});var Iu=At((Su,wc)=>{(function(e,t,n){function o(a){var s=this;s.next=function(){var p=s.x,l=s.i,h,d,b;return h=p[l],h^=h>>>7,d=h^h<<24,h=p[l+1&7],d^=h^h>>>10,h=p[l+3&7],d^=h^h>>>3,h=p[l+4&7],d^=h^h<<7,h=p[l+7&7],h=h^h<<13,d^=h^h<<9,p[l]=d,s.i=l+1&7,d};function c(p,l){var h,d,b=[];if(l===(l|0))d=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?d=b[7]=-1:d=b[h],p.x=b,p.i=0,h=256;h>0;--h)p.next()}c(s,a)}function r(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 o(a),p=s&&s.state,l=function(){return(c.next()>>>0)/4294967296};return l.double=function(){do var h=c.next()>>>11,d=(c.next()>>>0)/4294967296,b=(h+d)/(1<<21);while(b===0);return b},l.int32=c.next,l.quick=l,p&&(p.x&&r(p,c),l.state=function(){return r(c,{})}),l}t&&t.exports?t.exports=i:n&&n.amd?n(function(){return i}):this.xorshift7=i})(Su,typeof wc=="object"&&wc,typeof define=="function"&&define)}
2020-08-26 00:24:48 +02:00
`)),c.join(`
`)}function Ow(e,t,n,o){const r=Q(t),i=o[o.length-1],a=new Array(i).fill(0),s=t.length,c=n==="complex64"?ls(e):e;if(s>1)for(let p=0;p<r/i;p++){const l=p*i;for(let h=0;h<i;h++)a[h]=Math.max(a[h],ps(c[l+h],0,n).length)}return a}function ps(e,t,n){let o;return Array.isArray(e)?o=`${parseFloat(e[0].toFixed(Wp))} + ${parseFloat(e[1].toFixed(Wp))}j`:Rt(e)?o=`'${e}'`:n==="bool"?o=Ed(e):o=parseFloat(e.toFixed(Wp)).toString(),Fn(o,t)}function Ed(e){return e===0?"false":"true"}function Ea(e,t,n,o,r,i=!0){const a=n==="complex64"?2:1,s=t[0],c=t.length;if(c===0){if(n==="complex64"){const w=ls(e);return[ps(w[0],0,n)]}return n==="bool"?[Ed(e[0])]:[e[0].toString()]}if(c===1){if(s>_d){const L=cs*a;let S=Array.from(e.slice(0,L)),I=Array.from(e.slice((s-cs)*a,s*a));return n==="complex64"&&(S=ls(S),I=ls(I)),["["+S.map((N,A)=>ps(N,r[A],n)).join(", ")+", ..., "+I.map((N,A)=>ps(N,r[s-cs+A],n)).join(", ")+"]"]}const w=n==="complex64"?ls(e):Array.from(e);return["["+w.map((L,S)=>ps(L,r[S],n)).join(", ")+"]"]}const p=t.slice(1),l=o.slice(1),h=o[0]*a,d=[];if(s>_d){for(let w=0;w<cs;w++){const L=w*h,S=L+h;d.push(...Ea(e.slice(L,S),p,n,l,r,!1))}d.push("...");for(let w=s-cs;w<s;w++){const L=w*h,S=L+h;d.push(...Ea(e.slice(L,S),p,n,l,r,w===s-1))}}else for(let w=0;w<s;w++){const L=w*h,S=L+h;d.push(...Ea(e.slice(L,S),p,n,l,r,w===s-1))}const b=c===2?",":"";d[0]="["+d[0]+b;for(let w=1;w<d.length-1;w++)d[w]=" "+d[w]+b;let x=`,
2020-08-26 00:24:48 +02:00
`;for(let w=2;w<c;w++)x+=`
2020-09-08 18:45:03 +02:00
`;return d[d.length-1]=" "+d[d.length-1]+"]"+(i?"":x),d}function ls(e){const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}class Fo{constructor(e,t,n){if(this.dtype=t,this.shape=e.slice(),this.size=Q(e),n!=null){const o=n.length;f(o===this.size,()=>`Length of values '${o}' 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||Op(t,this.size),this.strides=Gt(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 o of e){if(o<0||o>=this.shape[t]){const r=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(r)}t++}let n=e[e.length-1];for(let o=0;o<e.length-1;++o)n+=this.strides[o]*e[o];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 qt().makeTensor(this.values,this.shape,this.dtype)}}let qt=null,Mo=null,kw=null;function Od(e){qt=e}function kd(e){Mo=e}function Dd(e){kw=e}class ee{constructor(e,t,n,o){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=Q(e),this.strides=Gt(e),this.dataId=n,this.id=o,this.rankType=this.rank<5?this.rank.toString():"higher"}get rank(){return this.shape.length}async buffer(){const e=await this.data();return Mo.buffer(this.shape,this.dtype,e)}bufferSync(){return Mo.buffer(this.shape,this.dtype,this.dataSync())}async array(){const e=await this.data();return Mn(this.shape,e)}arraySync(){return Mn(this.shape,this.dataSync())}async data(){this.throwIfDisposed();const e=qt().read(this.dataId);if(this.dtype==="string"){const t=await e;try{return t.map(n=>Ca(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=qt().readSync(this.dataId);if(this.dtype==="string")try{return e.map(t=>Ca(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 qt().read(this.dataId);return this.dtype==="string"?e:new Uint8Array(e.buffer)}dispose(){if(this.isDisposed)return;qt().disposeTensor(this),this.isDisposedInternal=!0}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return Mo.print(this,e)}clone(){return this.throwIfDisposed(),Mo.clone(this)}toString(e=!1){const t=this.dataSync();return Cd(t,this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),Mo.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),qt().makeVariable(this,e,t,n)}}Object.defineProperty(ee,Symbol.hasInstance,{value:e=>!!e&&e.dataId!=null&&e.shape!=null&&e.dtype!=null});class Ht extends ee{constructor(e,t,n,o){super(e.shape,e.dtype,e.dataId,o);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(!Te(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);qt().disposeTensor(this),this.dataId=e.dataId,qt().incRef(this,null)}dispose(){qt().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty(Ht,Symbol.hasInstance,{value:e=>e instanceof ee&&e.assign!=null&&e.assign instanceof Function});var Bp;(function(e){e.R0="R0",e.R1="R1",e.R2
with dtype ${p.dtype}. `)});const o=z(t,n[0].shape)[0],r=hl(n.map(p=>p.shape),o);if(Q(r)===0)return Ge([],r);if(n=n.filter(p=>p.size>0),n.length===1)return n[0];const i=n.map(p=>p.shape);ll(i,o);const a=(p,l)=>{const h=p.concat(n,o);return l(n),h},s=n,c={axis:t};return g.runKernelFunc(a,s,null,Wr,c)}const Z=m({concat_:Ex});function Ox(e,t,n=!1,o=!1){let r=u(e,"a","matMul"),i=u(t,"b","matMul");[r,i]=V(r,i),f(r.rank>=2&&i.rank>=2&&r.rank===i.rank,()=>`Error in matMul: inputs must have the same rank of at least 2, got ranks ${r.rank} and ${i.rank}.`);const a=n?r.shape[r.rank-2]:r.shape[r.rank-1],s=o?i.shape[i.rank-1]:i.shape[i.rank-2],c=n?r.shape[r.rank-1]:r.shape[r.rank-2],p=o?i.shape[i.rank-2]:i.shape[i.rank-1],l=r.shape.slice(0,-2),h=i.shape.slice(0,-2),d=Q(l),b=Q(h);f(Te(l,h),()=>`Error in matMul: outer dimensions (${l}) and (${h}) of Tensors with shapes ${r.shape} and ${i.shape} must match.`),f(a===s,()=>`Error in matMul: inner shapes (${a}) and (${s}) of Tensors with shapes ${r.shape} and ${i.shape} and transposeA=${n} and transposeB=${o} must match.`);const x=r.shape.slice(0,-2).concat([c,p]),w=n?y(r,[d,a,c]):y(r,[d,c,a]),L=o?y(i,[b,p,s]):y(i,[b,s,p]),S=(E,M)=>(M([w,L]),E.batchMatMul(w,L,n,o)),I={a:w,b:L},N={transposeA:n,transposeB:o},A=g.runKernelFunc(S,I,null,kr,N);return y(A,x)}const Y=m({matMul_:Ox});function kx(e,t){let n=u(e,"a","mul"),o=u(t,"b","mul");[n,o]=V(n,o);const r=(a,s)=>{const c=a.multiply(n,o);return s([n,o]),c},i={a:n,b:o};return g.runKernelFunc(r,i,null,wi)}const v=m({mul_:kx});function Dx(e){const t=u(e,"x","sigmoid"),n={x:t};return g.runKernelFunc((o,r)=>{const i=o.sigmoid(t);return r([i]),i},n,null,$i)}const lt=m({sigmoid_:Dx});const Gd={};Re(Gd,{assertParamsValid:()=>ul,computeFlatOffset:()=>Mx,computeOutShape:()=>dl,isSliceContinous:()=>Fx,maskToAxes:()=>ds,parseSliceParams:()=>ms,startForAxis:()=>wl,startIndicesWithElidedDims:()=>fl,stopForAxis:()=>xl,stopIndicesWithElidedDims:()=>gl,stridesForAxis:()=>bl,stridesWithElidedDims:()=>ml});function ul(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 o=0;o<e.rank;++o)f(t[o]+n[o]<=e.shape[o],()=>`Error in slice${e.rank}D: begin[${o}] + size[${o}] (${t[o]+n[o]}) would overflow input.shape[${o}] (${e.shape[o]})`)}function ds(e){const t=[];let n=0;for(;e>0;)e&1&&t.push(n),e/=2,n++;return t}function dl(e,t,n){const o=[];for(let r=0;r<e.length;r++)o[r]=Math.ceil((t[r]-e[r])/n[r]);return o}function ml(e,t,n,o){const r=[...e];for(let i=r.length;i<o.length;i++)r.push(1);for(let i=0;i<n;i++)i===0?r[t]=1:(r.splice(t,0,1),r.pop());return r}function Pd(e,t,n){return n<=e?n:n-(t-1)}function qd(e,t){const n=[];for(let o=0;o<e;o++)n.push(t+o);return n}function fl(e,t,n,o,r){const i=[...r],a=qd(n,t);for(let s=0;s<i.length;s++)if(a.indexOf(s)>-1)i[s]=0;else{const c=Pd(t,n,s);let p=o[c];e&1<<c&&(p=0),i[s]=p}return i}function gl(e,t,n,o,r){const i=[...r],a=qd(n,t);for(let s=0;s<i.length;s++)if(a.indexOf(s)>-1)i[s]=Number.MAX_SAFE_INTEGER;else{const c=Pd(t,n,s);let p=o[c];e&1<<c&&(p=Number.MAX_SAFE_INTEGER),i[s]=p}for(let s=0;s<i.length;s++){const c=r[s];i[s]<0&&(i[s]+=c),i[s]=Eo(0,i[s],r[s])}return i}function bl(e,t,n){let o=e[t];return(n&1<<t||o==null)&&(o=1),o}function wl(e,t,n,o,r,i){let a=t[r];const s=n[r]||1;(e&1<<r||i&1<<r||a==null)&&(s>0?a=Number.MIN_SAFE_INTEGER:a=Number.MAX_SAFE_INTEGER);const c=o[r];return a<0&&(a+=c),a=Eo(0,a,c-1),a}function xl(e,t,n,o,r,i){let a=t[r];const s=n[r]||1;(e&1<<r||i&1<<r||a==null)&&(s>0?a=Number.MAX_SAFE_INTEGER:a=Number.MIN_SAFE_INTEGER);const c=o[r];return a<0&&(a+=c),s>0?a=Eo(0,a,c):a=Eo(-1,a,c-1),a}function Fx(e,t,n){let o=n.length;for(let r=0;r<n.length;r++)if(n[r]>1){o=r;break}for(let r=o+1;r<n.length;r++)if(t[r]>0||n[r]!==e[r])return!1;return!0}function Mx(e,t){let n=e.length>0?e[e.length-1]:1;for(let o=0;o<e.length-1;o++)n+=e[o]*t[o];return n}function ms(e,t,n){let o;typeof t=="number"?o=[t,...new Array(e.ra
${r} and ${t} for depthToSpace with input shape
${o.shape}`),f(i*t>=0,()=>`Negative dimension size caused by overflow when multiplying
2020-08-26 00:24:48 +02:00
${i} and ${t} for depthToSpace with input shape
${o.shape}`),f(a%(t*t)===0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${a} for depthToSpace with input shape ${o.shape}`);const s=l=>l.depthToSpace(o,t,n),c={x:o},p={blockSize:t,dataFormat:n};return g.runKernelFunc(s,c,null,Gc,p)}const kl=m({depthToSpace_:ly});function hy(e,t,n,o,r="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=y(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(o),()=>`Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode ${a} but got pad ${o}.`);const h=(w,L)=>{i==null&&(i=[1,1]),f(le(n,i),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`);const S=je(p.shape,c.shape,n,i,o,a,!0),I=w.depthwiseConv2D(p,c,S);return L([p,c]),I},d={x:p,filter:c},b={strides:n,pad:o,dataFormat:r,dilations:i,dimRoundingMode:a},x=g.runKernelFunc(h,d,null,Hr,b);return l?y(x,[x.shape[1],x.shape[2],x.shape[3]]):x}const en=m({depthwiseConv2d_:hy});function uy(e){const t=u(e,"x","diag"),n=r=>{const i=y(t,[t.size]),a=r.diag(i),s=[...e.shape,...e.shape];return y(a,s)},o={x:t};return g.runKernelFunc(n,o,null,Hc)}const Dl=m({diag_:uy});function dy(e,t,n,o,r=[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=y(a,[1,a.shape[0],a.shape[1],a.shape[2]]),p=!0);const l={x:c,filter:s},h={strides:n,pad:o,dilations:r},d=g.runKernel(zr,l,h);return p?y(d,[d.shape[1],d.shape[2],d.shape[3]]):d}const Fl=m({dilation2d_:dy});function my(e,t){let n=u(e,"a","floorDiv"),o=u(t,"b","floorDiv");[n,o]=V(n,o);const r=(a,s)=>{const c=a.floorDiv(n,o);return s([n,o]),c},i={a:n,b:o};return g.runKernelFunc(r,i,null,Qr)}const bs=m({floorDiv_:my});function fy(e,t){let n=u(e,"a","div"),o=u(t,"b","div");if([n,o]=V(n,o),n.dtype==="int32"&&o.dtype==="int32")return bs(n,o);const r=(s,c)=>{const p=s.realDivide(n,o);return c([n,o]),p},i={a:n,b:o},a={};return g.runKernelFunc(r,i,null,Yr,a)}const F=m({div_:fy});function gy(e,t){const n=e.length,o=[];for(let r=0;r<n;r++){const i=n-1-r,a=e[i]||1,s=t[t.length-1-r]||1;s>1&&a===1&&o.unshift(i)}return o}function ae(e,t){const n=[];for(let o=0;o<t.length;o++){const r=e[e.length-o-1],i=t.length-o-1,a=t[i];(r==null||r===1&&a>1)&&n.unshift(i)}return n}function q(e,t){const n=[],o=Math.max(e.length,t.length);for(let r=0;r<o;r++){let i=e[e.length-r-1];i==null&&(i=1);let a=t[t.length-r-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 by(e,t){let n=u(e,"a","equal"),o=u(t,"b","equal");[n,o]=V(n,o),q(n.shape,o.shape);const r=a=>a.equal(n,o),i={a:n,b:o};return g.runKernelFunc(r,i,null,Kc)}const tn=m({equal_:by});function wy(e,t,n){const o=u(t,"a","where"),r=u(n,"b","where"),i=u(e,"condition","where","bool"),a=q(o.shape,r.shape),s=$o(o,a),c=$o(r,a);i.rank===1&&f(i.shape[0]===o.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,d)=>{const b=h.select(i,s,c);return d([i]),b},l={condition:i,t:s,e:c};return g.runKernelFunc(p,l,null,Di)}const Oe=m({where_:wy});function xy(e){const t=u(e,"x","zerosLike"),n={x:t};return g.runKernelFunc(o=>o.zerosLike(t),n,null,ts)}const W=m({zerosLike_:xy});function yy(e,t){let n=u(e,"a","div"),o=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=y(i,[1,i.shape[0],i.shape[1],i.shape[2]]));const c=(d,b)=>{const x=d.localResponseNormalization4D(a,t,n,o,r);return b([a,x]),x},p={x:a},l={depthRadius:t,bias:n,alpha:o,beta:r},h=g.runKernelFunc(c,p,null,li,l);return s?y(h,[h.shape[1],h.shape[2],h.shape[3]]):h}const zl=m({localResponseNormalization_:Ky});function Jy(e){const t=u(e,"x","log"),n={x:t};return g.runKernelFunc((o,r)=>{const i=o.log(t);return r([t]),i},n,null,ai)}const yt=m({log_:Jy});function Xy(e){const t=u(e,"x","log1p"),n={x:t};return g.runKernelFunc((o,r)=>{const i=o.log1p(t);return r([t]),i},n,null,ci)}const Ls=m({log1p_:Xy});function Zy(e){return f(jt(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{const o=u(t,"x","tf.grad",null),r=n!=null?u(n,"dy","tf.grad"):null;return g.tidy(()=>{const{value:i,grads:a}=g.gradients(()=>e(o),[o],r);return r!=null&&P(i.shape,r.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),Ma(a),a[0]})}}function Qy(e){return f(jt(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 o=Zt(t,"args","tf.grads",null),r=n!=null?u(n,"dy","tf.grads"):null;return g.tidy(()=>{const{value:i,grads:a}=g.gradients(()=>e(...o),o,r);return r!=null&&P(i.shape,r.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Ma(a),a})}}function eL(e){return f(jt(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{f(t instanceof ee,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),f(n==null||n instanceof ee,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");const{grads:o,value:r}=g.gradients(()=>e(t),[t],n);return Ma(o),{grad:o[0],value:r}}}function tL(e){return f(jt(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{f(Array.isArray(t)&&t.every(r=>r instanceof ee),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),f(n==null||n instanceof ee,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");const o=g.gradients(()=>e(...t),t,n);return n!=null&&P(o.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Ma(o.grads),o}}function Yl(e,t){f(jt(e),()=>"The f passed in variableGrads(f) must be a function"),f(t==null||Array.isArray(t)&&t.every(p=>p instanceof Ht),()=>"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 o=n?t.filter(p=>!p.trainable):null,r=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 ${r} 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])}),o!=null&&o.forEach(p=>c[p.name]=null),{value:a,grads:c}}function Ke(e){return g.customGrad(e)}function Ma(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 nL(e){const t=u(e,"x","neg"),n={x:t};return g.runKernelFunc(o=>o.neg(t),n,null,xi)}const ne=m({neg_:nL});function oL(e){const t=u(e,"x","softplus"),n={x:t};return g.runKernelFunc((o,r)=>{const i=o.softplus(t);return r([t]),i},n,null,ji)}const vs=m({softplus_:oL});function rL(e){const t=u(e,"x","logSigmoid"),n=Ke(o=>{const r=ne(vs(ne(o))),i=a=>{const s=v(a,lt(ne(o)));return s};return{value:r,gradFunc:i}});return n(t)}const Vl=m({logSigmoid_:rL});function iL(e,t=null,n=!1){const o=u(e,"x","max"),r=(s,c)=>{const p=z(t,o.shape);let l=p;const h=ge(l,o.rank);let d=o;h!=null&&(d=K(o,h),l=De(l.length,d.rank));const b=s.max(d,l);h!=null&&d.dispose();let x=b;if(n){const w=we(x.shape,z(t,o.shape));x=y(x,w),b.dispose()}return c([o,x]),x},i={x:o},a={reductionIndices:t,keepDims:n};return g.runKernelFunc(r,i,null,hi,a)}const dt=m({max_:iL});function sL(e,t){let n=u(e,"a","sub"),o=u(t,"b","sub");[n,o]=V(n,o);const r=(a,s)=>{const c=a.subtract(n,o);return s([n,o]),c},i={a:n,b:o};return g.runKernelFunc(r,i,null,Vi)}const O=m({sub_:sL});function aL(e,t=null,n=!1){let o=u(e,"x","sum");o.dtype==="bool"&&(o=_(o,"int32"));const r=(s,c)=>{c([o]);const p=z(t,o.shape),l=ge(p,o.rank);let h=p,d=o;l!=null&&(d=K(o,l),h=De(h.length,o.rank));let b=s.sum(d,h);if(n){const x=we(b.shape,p);b=y(b,x)}return b},i={x:o},a={axis:t,keepDims:n};return g.runKernelFunc(r,i,null,Pi,a)}const U=m({sum_:aL});function cL(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 o=(a,s)=>{const c=!0,p=dt(e,t,!0),l=O(e,p),h=O(_(l,"float32"),yt(U(Se(l),t,c)));return s([h]),h},r={logits:n},i={axis:t};return g.runKernelFunc(o,r,null,pi,i)}const Kl=m({logSoftmax_:cL});function pL(e,t=null,n=!1){const o=u(e,"x","logSumExp"),r=z(t,o.shape),i=dt(o,r,!0),a=O(o,i),s=Se(a),c=U(s,r),p=yt(c),l=R(y(i,p.shape),p);if(n){const h=we(l.shape,r);return y(l,h)}return l}const Ss=m({logSumExp_:pL});function lL(e,t){const n=u(e,"a","logicalAnd","bool"),o=u(t,"b","logicalAnd","bool");q(n.shape,o.shape);const r={a:n,b:o};return g.runKernelFunc(i=>i.logicalAnd(n,o),r,null,sp)}const Lt=m({logicalAnd_:lL});function hL(e){const t=u(e,"x","logicalNot","bool"),n={x:t};return g.runKernelFunc(o=>o.logicalNot(t),n,null,ap)}const zn=m({logicalNot_:hL});function uL(e,t){const n=u(e,"a","logicalOr","bool"),o=u(t,"b","logicalOr","bool");q(n.shape,o.shape);const r={a:n,b:o};return g.runKernelFunc(i=>i.logicalOr(n,o),r,null,cp)}const Is=m({logicalOr_:uL});function dL(e,t){const n=u(e,"a","logicalXor","bool"),o=u(t,"b","logicalXor","bool");return q(n.shape,o.shape),Lt(Is(e,t),zn(Lt(e,t)))}const Jl=m({logicalXor_:dL});function mL(e,t,n,o,r){const i=u(e,"x","maxPool"),a=1;let s=i,c=!1;i.rank===3&&(c=!0,s=y(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(le(n,a),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),r!=null&&f(X(o),()=>`Error in maxPool: pad must be an integer when using, dimRoundingMode ${r} but got pad ${o}.`);const p=(b,x)=>{const w=_t(s.shape,t,n,1,o,r);let L;return w.filterWidth===1&&w.filterHeight===1&&Te(w.inShape,w.outShape)?L=s.clone():L=b.maxPool(s,w),x([s,L]),L},l={x:s},h={filterSize:t,strides:n,pad:o,dimRoundingMode:r},d=g.runKernelFunc(p,l,null,di,h);return c?y(d,[d.shape[1],d.shape[2],d.shape[3]]):d}const Ae=m({maxPool_:mL});function fL(e,t=[1,1,1],n,o,r,i="NDHWC",a){a==null?a=[1,1,1]:Le("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=y(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(le(n,a),()=>`Error in maxPool3d: Either strides or dilations must be 1. Got strides ${n} and d
Actual: ${r}.
Expected: ${i}.`);for(let a=0;a<i.length;++a){const s=r[a],c=i[a];if(!n(s,c))throw new Error(`Arrays differ: actual[${a}] = ${s}, expected[${a}] = ${c}.
Actual: ${r}.
2020-09-08 18:45:03 +02:00
Expected: ${i}.`)}}function qL(e,t){e().then(()=>t.fail(),()=>t())}function HL(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])?uh(e,n,(o,r)=>o==r):uh(e,t,(o,r)=>dh(o,r,0))}function zL(e,t,n){if(n==null&&(n=hh()),!dh(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`)}function dh(e,t,n){return!isFinite(e)&&!isFinite(t)?!0:!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function YL(e,t,n){for(let o=0;o<e.length;o++)if(e[o]<t||e[o]>n)throw new Error(`Value out of range:${e[o]} low: ${t}, high: ${n}`)}function VL(e,t){expect(new Float32Array(e)).toEqual(new Float32Array(t))}const Wa=gu(Ou());class Ns{constructor(e,t,n,o,r){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=o,this.truncated&&(this.upper=this.mean+this.stdDev*2,this.lower=this.mean-this.stdDev*2);const i=r||Math.random();this.random=Wa.alea(i.toString())}nextValue(){if(!isNaN(this.nextVal)){const o=this.nextVal;return this.nextVal=NaN,o}let e,t,n=!1;for(;!n;){let o,r,i;do o=2*this.random()-1,r=2*this.random()-1,i=o*o+r*r;while(i>=1||i===0);const a=Math.sqrt(-2*Math.log(i)/i);e=this.mean+this.stdDev*o*a,t=this.mean+this.stdDev*r*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 Kd{constructor(e,t,n,o){this.alpha=e,this.beta=1/t,this.dtype=n;const r=o||Math.random();this.randu=Wa.alea(r.toString()),this.randn=new Ns(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,o,r,i;for(;;){do o=this.randn.nextValue(),i=1+this.c*o;while(i<=0);if(i*=i*i,e=o*o,t=1-.331*e*e,n=.5*e+this.d*(1-i+Math.log(i)),r=this.randu(),r<t||Math.log(r)<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 Jd{constructor(e=0,t=1,n,o){if(this.canReturnFloat=()=>this.dtype==null||this.dtype==="float32",this.min=e,this.range=t-e,this.dtype=n,o==null&&(o=Math.random()),typeof o=="number"&&(o=o.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=Wa.alea(o)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}function KL(e,t,n=1,o="float32",r){if(n==null&&(n=1),o==null&&(o="float32"),o!=="float32"&&o!=="int32")throw new Error(`Unsupported data type ${o}`);const i=new Kd(t,n,o,r),a=Be(e,o);for(let s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}const mh=m({randomGamma_:KL});function JL(e,t=0,n=1,o,r){if(o!=null&&o==="bool")throw new Error(`Unsupported data type ${o}`);const i=new Ns(t,n,o,!1,r),a=Be(e,o);for(let s=0;s<a.values.length;s++)a.values[s]=i.nextValue();return a.toTensor()}const fh=m({randomNormal_:JL});function XL(e,t=0,n=1,o="float32",r){const i=Be(e,o),a=new Jd(t,n,null,r);for(let s=0;s<i.values.length;s++)i.values[s]=a.nextValue();return i.toTensor()}const Rs=m({randomUniform_:XL});function ce(e,t){at(e);const n=We(e,t);if(n.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");const o=null;return ze(e,o,n,t)}function Po(e,t,n=1,o="float32"){if(n===0)throw new Error("Cannot have a step of zero");const r=()=>{const a=e===t,s=e<t&&n<0,c=t<e&&n>1;if(a||s||c)return Ce([0],o);const p=Math.abs(Math.ceil((t-e)/n)),l=Pt(p,o);t<e&&n===1&&(n=-1),l[0]=e;for(let h=1;h<l.length;h++)l[h]=l[h-1]+n;return ce(l,o)},i={start:e,stop:t,step:n,dtype:o};return g.runKernelFunc(r,{},null,wp,i)}function ZL(e){const t=u(e,"x","reciprocal"),n={x:t};return g.runKernelFunc((o,r)=>{const i=o.reciprocal(t);return r([t]),i},n,null,Ti)}const gh=m({reciprocal_:ZL});function QL(e){const t=u(e,"x","relu"),n=(r,i)=>(i([t]),t.dtype==="bool"?_(t,"int32"):r.relu(t)),o={x
Manifest JSON has weights with names: ${s.join(", ")}.`)}const c=r.reduce((b,x,w)=>(x&&b.push(w),b),[]),p=[];c.forEach(b=>{t[b].paths.forEach(x=>{const w=n+(n.endsWith("/")?"":"/")+x;p.push(w)})});const l=await e(p),h={};let d=0;return c.forEach(b=>{const x=t[b].paths.length;let w=0;for(let A=0;A<x;A++)w+=l[d+A].byteLength;const L=new ArrayBuffer(w),S=new Uint8Array(L);let I=0;for(let A=0;A<x;A++){const E=new Uint8Array(l[d+A]);S.set(E,I),I+=E.byteLength}const N=i[b];N.forEach(A=>{const E=L.slice(A.groupOffset,A.groupOffset+A.sizeBytes),M=$h(E,[A.manifestEntry]);for(const D in M)h[D]=M[D]}),d+=x}),h}}const pI="application/octet-stream",lI="application/json";class qh{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=pe().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}],o={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(o)],{type:lI}),"model.json"),e.weightData!=null&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:pI}),"model.weights.bin");const r=await this.fetch(this.path,t);if(r.ok)return{modelArtifactsInfo:Ws(e),responses:[r]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${r.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,o=t.weightsManifest,r=t.generatedBy,i=t.convertedBy,a=t.format,s=t.userDefinedMetadata;if(n==null&&o==null)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);let c,p;if(o!=null){const l=await this.loadWeights(o);[c,p]=l}return{modelTopology:n,weightSpecs:c,weightData:p,userDefinedMetadata:s,generatedBy:r,convertedBy:i,format:a}}async loadWeights(e){const t=Array.isArray(this.path)?this.path[1]:this.path,[n,o]=hI(t),r=this.weightPathPrefix||n,i=[];for(const c of e)i.push(...c.weights);const a=[];e.forEach(c=>{c.paths.forEach(p=>{a.push(r+p+o)})});const s=await Ph(a,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[i,Us(s)]}}qh.URL_SCHEME_REGEX=/^https?:\/\//;function hI(e){const t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),o=e.substring(0,t),r=n>t?e.substring(n):"";return[o+"/",r]}function Hh(e){return e.match(qh.URL_SCHEME_REGEX)!=null}const lf=(e,t)=>{if(typeof fetch=="undefined"&&(t==null||t.fet
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