MCPcopy Create free account
hub / github.com/tensorflow/tfjs / getNumericArrayParam

Function getNumericArrayParam

tfjs-converter/src/operations/operation_mapper.ts:565–576  ·  view source on GitHub ↗
(
    attrs: {[key: string]: tensorflow.IAttrValue}, name: string,
    def: number[])

Source from the content-addressed store, hash-verified

563}
564
565export function getNumericArrayParam(
566 attrs: {[key: string]: tensorflow.IAttrValue}, name: string,
567 def: number[]): number[] {
568 const param = attrs[name];
569 if (param) {
570 return ((param.list.f && param.list.f.length ? param.list.f :
571 param.list.i) ||
572 [])
573 .map(v => (typeof v === 'number') ? v : parseInt(v, 10));
574 }
575 return def;
576}
577
578export function getStringArrayParam(
579 attrs: {[key: string]: tensorflow.IAttrValue}, name: string, def: string[],

Callers 2

getAttrMethod · 0.90
mapNodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…