scripts/install.js
function getPlatformLibtensorflowUri() {
  let targetUri = BASE_URI;
  if (platform === 'linux') {
    if (os.arch() === 'arm') {
      // TODO(kreeger): Update to TensorFlow 1.13:
      // https://github.com/tensorflow/tfjs/issues/1370
      targetUri =
          'https://storage.googleapis.com/tf-builds/libtensorflow_r1_12_linux_arm.tar.gz';
    } else {
      if (libType === 'gpu') {
        targetUri += GPU_LINUX;
      } else {
        targetUri += CPU_LINUX;
      }
    }
  } else if (platform === 'darwin') {
    targetUri += CPU_DARWIN;
  } else if (platform === 'win32') {
    // Use windows path
    path = path.win32;
    if (libType === 'gpu') {
      targetUri += GPU_WINDOWS;
    } else {
      targetUri += CPU_WINDOWS;
    }
  } else {
    throw new Error(`Unsupported platform: ${platform}`);
  }
  return targetUri;
}
function getPlatformLibtensorflowUri() {
  let targetUri = BASE_URI;
  if (platform === 'linux') {
    if (os.arch() === 'arm') {
      // TODO(kreeger): Update to TensorFlow 1.13:
      // https://github.com/tensorflow/tfjs/issues/1370
      targetUri =
          'https://storage.googleapis.com/tf-builds/libtensorflow_r1_12_linux_arm.tar.gz';
    } else {
      if (libType === 'gpu') {
        targetUri += GPU_LINUX;
      } else {
        targetUri += CPU_LINUX;
      }
    }
  } else if (platform === 'darwin') {
    targetUri += CPU_DARWIN;
  } else if (platform === 'win32') {
    // Use windows path
    path = path.win32;
    if (libType === 'gpu') {
      targetUri += GPU_WINDOWS;
    } else {
      targetUri += CPU_WINDOWS;
    }
  } else {
    throw new Error(`Unsupported platform: ${platform}`);
  }
  return targetUri;
}
function getPlatformLibtensorflowUri ( ) { let targetUri = BASE_URI ; if ( platform === 'linux' ) { if ( os . arch ( ) === 'arm' ) { // TODO(kreeger): Update to TensorFlow 1.13: // https://github.com/tensorflow/tfjs/issues/1370 targetUri = 'https://storage.googleapis.com/tf-builds/libtensorflow_r1_12_linux_arm.tar.gz' ; } else { if ( libType === 'gpu' ) { targetUri += GPU_LINUX ; } else { targetUri += CPU_LINUX ; } } } else if ( platform === 'darwin' ) { targetUri += CPU_DARWIN ; } else if ( platform === 'win32' ) { // Use windows path path = path . win32 ; if ( libType === 'gpu' ) { targetUri += GPU_WINDOWS ; } else { targetUri += CPU_WINDOWS ; } } else { throw new Error ( ` ${ platform } ` ) ; } return targetUri ; }
Returns the libtensorflow hosted path of the current platform.
Returns the libtensorflow hosted path of the current platform .