SYMBOL INDEX (3077 symbols across 371 files) FILE: lite/codelabs/flower_classification/android/finish/app/src/androidTest/java/org/tensorflow/lite/examples/classification/ClassifierTest.java class ClassifierTest (line 43) | @RunWith(AndroidJUnit4.class) method classificationResultsShouldNotChange (line 53) | @Test method loadImage (line 75) | private static Bitmap loadImage(String fileName) { method loadRecognitions (line 87) | private static List loadRecognitions(String fileName) { FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/CameraActivity.java class CameraActivity (line 59) | public abstract class CameraActivity extends AppCompatActivity method onCreate (line 102) | @Override method getRgbBytes (line 194) | protected int[] getRgbBytes() { method getLuminanceStride (line 199) | protected int getLuminanceStride() { method getLuminance (line 203) | protected byte[] getLuminance() { method onPreviewFrame (line 208) | @Override method onImageAvailable (line 253) | @Override method onStart (line 316) | @Override method onResume (line 322) | @Override method onPause (line 332) | @Override method onStop (line 348) | @Override method onDestroy (line 354) | @Override method runInBackground (line 360) | protected synchronized void runInBackground(final Runnable r) { method onRequestPermissionsResult (line 366) | @Override method allPermissionsGranted (line 379) | private static boolean allPermissionsGranted(final int[] grantResults) { method hasPermission (line 388) | private boolean hasPermission() { method requestPermission (line 396) | private void requestPermission() { method isHardwareLevelSupported (line 410) | private boolean isHardwareLevelSupported( method chooseCamera (line 420) | private String chooseCamera() { method setFragment (line 456) | protected void setFragment() { method fillBytes (line 485) | protected void fillBytes(final Plane[] planes, final byte[][] yuvBytes) { method readyForNextImage (line 498) | protected void readyForNextImage() { method getScreenOrientation (line 504) | protected int getScreenOrientation() { method showResultsInBottomSheet (line 517) | @UiThread method showFrameInfo (line 546) | protected void showFrameInfo(String frameInfo) { method showCropInfo (line 550) | protected void showCropInfo(String cropInfo) { method showCameraResolution (line 554) | protected void showCameraResolution(String cameraInfo) { method showRotationInfo (line 558) | protected void showRotationInfo(String rotation) { method showInference (line 562) | protected void showInference(String inferenceTime) { method getDevice (line 566) | protected Device getDevice() { method setDevice (line 570) | private void setDevice(Device device) { method getNumThreads (line 582) | protected int getNumThreads() { method setNumThreads (line 586) | private void setNumThreads(int numThreads) { method processImage (line 594) | protected abstract void processImage(); method onPreviewSizeChosen (line 596) | protected abstract void onPreviewSizeChosen(final Size size, final int... method getLayoutId (line 598) | protected abstract int getLayoutId(); method getDesiredPreviewFrameSize (line 600) | protected abstract Size getDesiredPreviewFrameSize(); method onInferenceConfigurationChanged (line 602) | protected abstract void onInferenceConfigurationChanged(); method onClick (line 604) | @Override method onItemSelected (line 623) | @Override method onNothingSelected (line 630) | @Override FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/CameraConnectionFragment.java class CameraConnectionFragment (line 70) | @SuppressWarnings("FragmentNotInstantiable") method onCaptureProgressed (line 104) | @Override method onCaptureCompleted (line 110) | @Override method onSurfaceTextureAvailable (line 138) | @Override method onSurfaceTextureSizeChanged (line 144) | @Override method onSurfaceTextureDestroyed (line 150) | @Override method onSurfaceTextureUpdated (line 155) | @Override method onOpened (line 167) | @Override method onDisconnected (line 175) | @Override method onError (line 182) | @Override method CameraConnectionFragment (line 194) | @SuppressLint("ValidFragment") method chooseOptimalSize (line 215) | protected static Size chooseOptimalSize(final Size[] choices, final in... method newInstance (line 256) | public static CameraConnectionFragment newInstance( method showToast (line 269) | private void showToast(final String text) { method onCreateView (line 282) | @Override method onViewCreated (line 288) | @Override method onActivityCreated (line 293) | @Override method onResume (line 298) | @Override method onPause (line 314) | @Override method setCamera (line 321) | public void setCamera(String cameraId) { method setUpCameraOutputs (line 326) | private void setUpCameraOutputs() { method openCamera (line 367) | private void openCamera(final int width, final int height) { method closeCamera (line 385) | private void closeCamera() { method startBackgroundThread (line 408) | private void startBackgroundThread() { method stopBackgroundThread (line 415) | private void stopBackgroundThread() { method createCameraPreviewSession (line 427) | private void createCameraPreviewSession() { method configureTransform (line 503) | private void configureTransform(final int viewWidth, final int viewHei... type ConnectionCallback (line 533) | public interface ConnectionCallback { method onPreviewSizeChosen (line 534) | void onPreviewSizeChosen(Size size, int cameraRotation); class CompareSizesByArea (line 538) | static class CompareSizesByArea implements Comparator { method compare (line 539) | @Override class ErrorDialog (line 548) | public static class ErrorDialog extends DialogFragment { method newInstance (line 551) | public static ErrorDialog newInstance(final String message) { method onCreateDialog (line 559) | @Override FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/ClassifierActivity.java class ClassifierActivity (line 33) | public class ClassifierActivity extends CameraActivity implements OnImag... method getLayoutId (line 47) | @Override method getDesiredPreviewFrameSize (line 52) | @Override method onPreviewSizeChosen (line 57) | @Override method processImage (line 81) | @Override method onInferenceConfigurationChanged (line 115) | @Override method recreateClassifier (line 126) | private void recreateClassifier(Device device, int numThreads) { FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/LegacyCameraConnectionFragment.java class LegacyCameraConnectionFragment (line 40) | public class LegacyCameraConnectionFragment extends Fragment { method onSurfaceTextureAvailable (line 65) | @Override method onSurfaceTextureSizeChanged (line 106) | @Override method onSurfaceTextureDestroyed (line 110) | @Override method onSurfaceTextureUpdated (line 115) | @Override method LegacyCameraConnectionFragment (line 121) | @SuppressLint("ValidFragment") method LegacyCameraConnectionFragment (line 129) | public LegacyCameraConnectionFragment() { method onCreateView (line 132) | @Override method onViewCreated (line 138) | @Override method onActivityCreated (line 143) | @Override method onResume (line 148) | @Override method onPause (line 166) | @Override method startBackgroundThread (line 174) | private void startBackgroundThread() { method stopBackgroundThread (line 180) | private void stopBackgroundThread() { method stopCamera (line 190) | protected void stopCamera() { method getCameraId (line 199) | private int getCameraId() { FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/customview/AutoFitTextureView.java class AutoFitTextureView (line 24) | public class AutoFitTextureView extends TextureView { method AutoFitTextureView (line 28) | public AutoFitTextureView(final Context context) { method AutoFitTextureView (line 32) | public AutoFitTextureView(final Context context, final AttributeSet at... method AutoFitTextureView (line 36) | public AutoFitTextureView(final Context context, final AttributeSet at... method setAspectRatio (line 48) | public void setAspectRatio(final int width, final int height) { method onMeasure (line 57) | @Override FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/customview/OverlayView.java class OverlayView (line 26) | public class OverlayView extends View { method OverlayView (line 29) | public OverlayView(final Context context, final AttributeSet attrs) { method addCallback (line 33) | public void addCallback(final DrawCallback callback) { method draw (line 37) | @Override type DrawCallback (line 45) | public interface DrawCallback { method drawCallback (line 46) | public void drawCallback(final Canvas canvas); FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/customview/RecognitionScoreView.java class RecognitionScoreView (line 27) | public class RecognitionScoreView extends View implements ResultsView { method RecognitionScoreView (line 34) | public RecognitionScoreView(final Context context, final AttributeSet ... method setResults (line 47) | @Override method onDraw (line 53) | @Override FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/customview/ResultsView.java type ResultsView (line 21) | public interface ResultsView { method setResults (line 22) | public void setResults(final List results); FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/env/BorderedText.java class BorderedText (line 28) | public class BorderedText { method BorderedText (line 40) | public BorderedText(final float textSize) { method BorderedText (line 52) | public BorderedText(final int interiorColor, final int exteriorColor, ... method setTypeface (line 71) | public void setTypeface(Typeface typeface) { method drawText (line 76) | public void drawText(final Canvas canvas, final float posX, final floa... method drawLines (line 81) | public void drawLines(Canvas canvas, final float posX, final float pos... method setInteriorColor (line 89) | public void setInteriorColor(final int color) { method setExteriorColor (line 93) | public void setExteriorColor(final int color) { method getTextSize (line 97) | public float getTextSize() { method setAlpha (line 101) | public void setAlpha(final int alpha) { method getTextBounds (line 106) | public void getTextBounds( method setTextAlign (line 111) | public void setTextAlign(final Align align) { FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/env/ImageUtils.java class ImageUtils (line 24) | public class ImageUtils { method getYUVByteSize (line 36) | public static int getYUVByteSize(final int width, final int height) { method saveBitmap (line 52) | public static void saveBitmap(final Bitmap bitmap) { method saveBitmap (line 62) | public static void saveBitmap(final Bitmap bitmap, final String filena... method convertYUV420SPToARGB8888 (line 87) | public static void convertYUV420SPToARGB8888(byte[] input, int width, ... method YUV2RGB (line 106) | private static int YUV2RGB(int y, int u, int v) { method convertYUV420ToARGB8888 (line 130) | public static void convertYUV420ToARGB8888( FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/env/Logger.java class Logger (line 23) | public final class Logger { method Logger (line 46) | public Logger(final Class clazz) { method Logger (line 55) | public Logger(final String messagePrefix) { method Logger (line 70) | public Logger(final String tag, final String messagePrefix) { method Logger (line 77) | public Logger() { method Logger (line 82) | public Logger(final int minLogLevel) { method getCallerSimpleName (line 99) | private static String getCallerSimpleName() { method setMinLogLevel (line 115) | public void setMinLogLevel(final int minLogLevel) { method isLoggable (line 119) | public boolean isLoggable(final int logLevel) { method toMessage (line 123) | @SuppressWarnings("AnnotateFormatMethod") method v (line 128) | @SuppressWarnings("AnnotateFormatMethod") method v (line 135) | @SuppressWarnings("AnnotateFormatMethod") method d (line 142) | @SuppressWarnings("AnnotateFormatMethod") method d (line 149) | @SuppressWarnings("AnnotateFormatMethod") method i (line 156) | @SuppressWarnings("AnnotateFormatMethod") method i (line 163) | @SuppressWarnings("AnnotateFormatMethod") method w (line 170) | @SuppressWarnings("AnnotateFormatMethod") method w (line 177) | @SuppressWarnings("AnnotateFormatMethod") method e (line 184) | @SuppressWarnings("AnnotateFormatMethod") method e (line 191) | @SuppressWarnings("AnnotateFormatMethod") FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/tflite/Classifier.java class Classifier (line 48) | public abstract class Classifier { type Device (line 52) | public enum Device { method create (line 100) | public static Classifier create(Activity activity, Device device, int ... class Recognition (line 107) | public static class Recognition { method Recognition (line 125) | public Recognition( method getId (line 133) | public String getId() { method getTitle (line 137) | public String getTitle() { method getConfidence (line 141) | public Float getConfidence() { method getLocation (line 145) | public RectF getLocation() { method setLocation (line 149) | public void setLocation(RectF location) { method toString (line 153) | @Override method Classifier (line 177) | protected Classifier(Activity activity, Device device, int numThreads)... method recognizeImage (line 219) | public List recognizeImage(final Bitmap bitmap, int senso... method close (line 252) | public void close() { method getImageSizeX (line 268) | public int getImageSizeX() { method getImageSizeY (line 273) | public int getImageSizeY() { method loadImage (line 278) | private TensorImage loadImage(final Bitmap bitmap, int sensorOrientati... method getTopKProbability (line 298) | private static List getTopKProbability(Map... method getModelPath (line 324) | protected abstract String getModelPath(); method getLabelPath (line 327) | protected abstract String getLabelPath(); method getPreprocessNormalizeOp (line 330) | protected abstract TensorOperator getPreprocessNormalizeOp(); method getPostprocessNormalizeOp (line 340) | protected abstract TensorOperator getPostprocessNormalizeOp(); FILE: lite/codelabs/flower_classification/android/finish/app/src/main/java/org/tensorflow/lite/examples/classification/tflite/ClassifierFloatMobileNet.java class ClassifierFloatMobileNet (line 25) | public class ClassifierFloatMobileNet extends Classifier { method ClassifierFloatMobileNet (line 45) | public ClassifierFloatMobileNet(Activity activity, Device device, int ... method getModelPath (line 51) | @Override method getLabelPath (line 56) | @Override method getPreprocessNormalizeOp (line 61) | @Override method getPostprocessNormalizeOp (line 66) | @Override FILE: lite/codelabs/flower_classification/android/start/app/src/androidTest/java/org/tensorflow/lite/examples/classification/ClassifierTest.java class ClassifierTest (line 44) | @RunWith(AndroidJUnit4.class) method classificationResultsShouldNotChange (line 54) | @Test method loadImage (line 76) | private static Bitmap loadImage(String fileName) { method loadRecognitions (line 88) | private static List loadRecognitions(String fileName) { FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/CameraActivity.java class CameraActivity (line 59) | public abstract class CameraActivity extends AppCompatActivity method onCreate (line 102) | @Override method getRgbBytes (line 194) | protected int[] getRgbBytes() { method getLuminanceStride (line 199) | protected int getLuminanceStride() { method getLuminance (line 203) | protected byte[] getLuminance() { method onPreviewFrame (line 208) | @Override method onImageAvailable (line 253) | @Override method onStart (line 316) | @Override method onResume (line 322) | @Override method onPause (line 332) | @Override method onStop (line 348) | @Override method onDestroy (line 354) | @Override method runInBackground (line 360) | protected synchronized void runInBackground(final Runnable r) { method onRequestPermissionsResult (line 366) | @Override method allPermissionsGranted (line 378) | private static boolean allPermissionsGranted(final int[] grantResults) { method hasPermission (line 387) | private boolean hasPermission() { method requestPermission (line 395) | private void requestPermission() { method isHardwareLevelSupported (line 409) | private boolean isHardwareLevelSupported( method chooseCamera (line 419) | private String chooseCamera() { method setFragment (line 455) | protected void setFragment() { method fillBytes (line 484) | protected void fillBytes(final Plane[] planes, final byte[][] yuvBytes) { method readyForNextImage (line 497) | protected void readyForNextImage() { method getScreenOrientation (line 503) | protected int getScreenOrientation() { method showResultsInBottomSheet (line 516) | @UiThread method showFrameInfo (line 545) | protected void showFrameInfo(String frameInfo) { method showCropInfo (line 549) | protected void showCropInfo(String cropInfo) { method showCameraResolution (line 553) | protected void showCameraResolution(String cameraInfo) { method showRotationInfo (line 557) | protected void showRotationInfo(String rotation) { method showInference (line 561) | protected void showInference(String inferenceTime) { method getDevice (line 565) | protected Device getDevice() { method setDevice (line 569) | private void setDevice(Device device) { method getNumThreads (line 581) | protected int getNumThreads() { method setNumThreads (line 585) | private void setNumThreads(int numThreads) { method processImage (line 593) | protected abstract void processImage(); method onPreviewSizeChosen (line 595) | protected abstract void onPreviewSizeChosen(final Size size, final int... method getLayoutId (line 597) | protected abstract int getLayoutId(); method getDesiredPreviewFrameSize (line 599) | protected abstract Size getDesiredPreviewFrameSize(); method onInferenceConfigurationChanged (line 601) | protected abstract void onInferenceConfigurationChanged(); method onClick (line 603) | @Override method onItemSelected (line 622) | @Override method onNothingSelected (line 629) | @Override FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/CameraConnectionFragment.java class CameraConnectionFragment (line 70) | @SuppressWarnings("FragmentNotInstantiable") method onCaptureProgressed (line 104) | @Override method onCaptureCompleted (line 110) | @Override method onSurfaceTextureAvailable (line 138) | @Override method onSurfaceTextureSizeChanged (line 144) | @Override method onSurfaceTextureDestroyed (line 150) | @Override method onSurfaceTextureUpdated (line 155) | @Override method onOpened (line 167) | @Override method onDisconnected (line 175) | @Override method onError (line 182) | @Override method CameraConnectionFragment (line 194) | @SuppressLint("ValidFragment") method chooseOptimalSize (line 215) | protected static Size chooseOptimalSize(final Size[] choices, final in... method newInstance (line 256) | public static CameraConnectionFragment newInstance( method showToast (line 269) | private void showToast(final String text) { method onCreateView (line 282) | @Override method onViewCreated (line 288) | @Override method onActivityCreated (line 293) | @Override method onResume (line 298) | @Override method onPause (line 314) | @Override method setCamera (line 321) | public void setCamera(String cameraId) { method setUpCameraOutputs (line 326) | private void setUpCameraOutputs() { method openCamera (line 367) | private void openCamera(final int width, final int height) { method closeCamera (line 385) | private void closeCamera() { method startBackgroundThread (line 408) | private void startBackgroundThread() { method stopBackgroundThread (line 415) | private void stopBackgroundThread() { method createCameraPreviewSession (line 427) | private void createCameraPreviewSession() { method configureTransform (line 503) | private void configureTransform(final int viewWidth, final int viewHei... type ConnectionCallback (line 533) | public interface ConnectionCallback { method onPreviewSizeChosen (line 534) | void onPreviewSizeChosen(Size size, int cameraRotation); class CompareSizesByArea (line 538) | static class CompareSizesByArea implements Comparator { method compare (line 539) | @Override class ErrorDialog (line 548) | public static class ErrorDialog extends DialogFragment { method newInstance (line 551) | public static ErrorDialog newInstance(final String message) { method onCreateDialog (line 559) | @Override FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/ClassifierActivity.java class ClassifierActivity (line 33) | public class ClassifierActivity extends CameraActivity implements OnImag... method getLayoutId (line 47) | @Override method getDesiredPreviewFrameSize (line 52) | @Override method onPreviewSizeChosen (line 57) | @Override method processImage (line 81) | @Override method onInferenceConfigurationChanged (line 115) | @Override method recreateClassifier (line 126) | private void recreateClassifier(Device device, int numThreads) { FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/LegacyCameraConnectionFragment.java class LegacyCameraConnectionFragment (line 40) | public class LegacyCameraConnectionFragment extends Fragment { method onSurfaceTextureAvailable (line 65) | @Override method onSurfaceTextureSizeChanged (line 106) | @Override method onSurfaceTextureDestroyed (line 110) | @Override method onSurfaceTextureUpdated (line 115) | @Override method LegacyCameraConnectionFragment (line 121) | @SuppressLint("ValidFragment") method LegacyCameraConnectionFragment (line 129) | public LegacyCameraConnectionFragment() { method onCreateView (line 132) | @Override method onViewCreated (line 138) | @Override method onActivityCreated (line 143) | @Override method onResume (line 148) | @Override method onPause (line 166) | @Override method startBackgroundThread (line 174) | private void startBackgroundThread() { method stopBackgroundThread (line 180) | private void stopBackgroundThread() { method stopCamera (line 190) | protected void stopCamera() { method getCameraId (line 199) | private int getCameraId() { FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/customview/AutoFitTextureView.java class AutoFitTextureView (line 24) | public class AutoFitTextureView extends TextureView { method AutoFitTextureView (line 28) | public AutoFitTextureView(final Context context) { method AutoFitTextureView (line 32) | public AutoFitTextureView(final Context context, final AttributeSet at... method AutoFitTextureView (line 36) | public AutoFitTextureView(final Context context, final AttributeSet at... method setAspectRatio (line 48) | public void setAspectRatio(final int width, final int height) { method onMeasure (line 57) | @Override FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/customview/OverlayView.java class OverlayView (line 26) | public class OverlayView extends View { method OverlayView (line 29) | public OverlayView(final Context context, final AttributeSet attrs) { method addCallback (line 33) | public void addCallback(final DrawCallback callback) { method draw (line 37) | @Override type DrawCallback (line 45) | public interface DrawCallback { method drawCallback (line 46) | public void drawCallback(final Canvas canvas); FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/customview/RecognitionScoreView.java class RecognitionScoreView (line 27) | public class RecognitionScoreView extends View implements ResultsView { method RecognitionScoreView (line 34) | public RecognitionScoreView(final Context context, final AttributeSet ... method setResults (line 47) | @Override method onDraw (line 53) | @Override FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/customview/ResultsView.java type ResultsView (line 21) | public interface ResultsView { method setResults (line 22) | public void setResults(final List results); FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/env/BorderedText.java class BorderedText (line 28) | public class BorderedText { method BorderedText (line 40) | public BorderedText(final float textSize) { method BorderedText (line 52) | public BorderedText(final int interiorColor, final int exteriorColor, ... method setTypeface (line 71) | public void setTypeface(Typeface typeface) { method drawText (line 76) | public void drawText(final Canvas canvas, final float posX, final floa... method drawLines (line 81) | public void drawLines(Canvas canvas, final float posX, final float pos... method setInteriorColor (line 89) | public void setInteriorColor(final int color) { method setExteriorColor (line 93) | public void setExteriorColor(final int color) { method getTextSize (line 97) | public float getTextSize() { method setAlpha (line 101) | public void setAlpha(final int alpha) { method getTextBounds (line 106) | public void getTextBounds( method setTextAlign (line 111) | public void setTextAlign(final Align align) { FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/env/ImageUtils.java class ImageUtils (line 24) | public class ImageUtils { method getYUVByteSize (line 36) | public static int getYUVByteSize(final int width, final int height) { method saveBitmap (line 52) | public static void saveBitmap(final Bitmap bitmap) { method saveBitmap (line 62) | public static void saveBitmap(final Bitmap bitmap, final String filena... method convertYUV420SPToARGB8888 (line 87) | public static void convertYUV420SPToARGB8888(byte[] input, int width, ... method YUV2RGB (line 106) | private static int YUV2RGB(int y, int u, int v) { method convertYUV420ToARGB8888 (line 130) | public static void convertYUV420ToARGB8888( FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/env/Logger.java class Logger (line 23) | public final class Logger { method Logger (line 46) | public Logger(final Class clazz) { method Logger (line 55) | public Logger(final String messagePrefix) { method Logger (line 70) | public Logger(final String tag, final String messagePrefix) { method Logger (line 77) | public Logger() { method Logger (line 82) | public Logger(final int minLogLevel) { method getCallerSimpleName (line 99) | private static String getCallerSimpleName() { method setMinLogLevel (line 115) | public void setMinLogLevel(final int minLogLevel) { method isLoggable (line 119) | public boolean isLoggable(final int logLevel) { method toMessage (line 123) | @SuppressWarnings("AnnotateFormatMethod") method v (line 128) | @SuppressWarnings("AnnotateFormatMethod") method v (line 135) | @SuppressWarnings("AnnotateFormatMethod") method d (line 142) | @SuppressWarnings("AnnotateFormatMethod") method d (line 149) | @SuppressWarnings("AnnotateFormatMethod") method i (line 156) | @SuppressWarnings("AnnotateFormatMethod") method i (line 163) | @SuppressWarnings("AnnotateFormatMethod") method w (line 170) | @SuppressWarnings("AnnotateFormatMethod") method w (line 177) | @SuppressWarnings("AnnotateFormatMethod") method e (line 184) | @SuppressWarnings("AnnotateFormatMethod") method e (line 191) | @SuppressWarnings("AnnotateFormatMethod") FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/tflite/Classifier.java class Classifier (line 48) | public abstract class Classifier { type Device (line 52) | public enum Device { method create (line 100) | public static Classifier create(Activity activity, Device device, int ... class Recognition (line 107) | public static class Recognition { method Recognition (line 125) | public Recognition( method getId (line 133) | public String getId() { method getTitle (line 137) | public String getTitle() { method getConfidence (line 141) | public Float getConfidence() { method getLocation (line 145) | public RectF getLocation() { method setLocation (line 149) | public void setLocation(RectF location) { method toString (line 153) | @Override method Classifier (line 177) | protected Classifier(Activity activity, Device device, int numThreads)... method recognizeImage (line 219) | public List recognizeImage(final Bitmap bitmap, int senso... method close (line 250) | public void close() { method getImageSizeX (line 262) | public int getImageSizeX() { method getImageSizeY (line 267) | public int getImageSizeY() { method loadImage (line 272) | private TensorImage loadImage(final Bitmap bitmap, int sensorOrientati... method getTopKProbability (line 291) | private static List getTopKProbability(Map... method getModelPath (line 317) | protected abstract String getModelPath(); method getLabelPath (line 320) | protected abstract String getLabelPath(); method getPreprocessNormalizeOp (line 323) | protected abstract TensorOperator getPreprocessNormalizeOp(); method getPostprocessNormalizeOp (line 333) | protected abstract TensorOperator getPostprocessNormalizeOp(); FILE: lite/codelabs/flower_classification/android/start/app/src/main/java/org/tensorflow/lite/examples/classification/tflite/ClassifierFloatMobileNet.java class ClassifierFloatMobileNet (line 25) | public class ClassifierFloatMobileNet extends Classifier { method ClassifierFloatMobileNet (line 45) | public ClassifierFloatMobileNet(Activity activity, Device device, int ... method getModelPath (line 51) | @Override method getLabelPath (line 56) | @Override method getPreprocessNormalizeOp (line 61) | @Override method getPostprocessNormalizeOp (line 66) | @Override FILE: lite/examples/acceleration_service/android_play_services/app/src/androidTest/java/org/tensorflow/lite/examples/accelerationservice/CustomValidationTest.java class CustomValidationTest (line 52) | @RunWith(AndroidJUnit4.class) method setUp (line 65) | @Before method cpuCustomValidationOnPlainAdditionModel_succeeds (line 77) | @Test method cpuCustomValidationOnMobileNetV1Model_succeeds (line 85) | @Test method runScenario (line 93) | private Task runScenario(AssetModel assetModel) { method getMainActivity (line 108) | private Task getMainActivity() { FILE: lite/examples/acceleration_service/android_play_services/app/src/androidTest/java/org/tensorflow/lite/examples/accelerationservice/NoopLogger.java class NoopLogger (line 22) | class NoopLogger implements Logger { method error (line 24) | @Override method info (line 27) | @Override method clear (line 30) | @Override FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/MainActivity.java class MainActivity (line 57) | public class MainActivity extends AppCompatActivity { method onCreate (line 70) | @Override method runScenario (line 115) | public Task runScenario( method runPlainAdditionCpuValidation (line 158) | private Task runPlainAdditionCpuValidation() { method runMobileNetV1CpuValidation (line 165) | private Task runMobileNetV1CpuValidation() { method runPlainAdditionGpuValidation (line 172) | private Task runPlainAdditionGpuValidation() { method runMobileNetV1GpuValidation (line 179) | private Task runMobileNetV1GpuValidation() { method runValidation (line 186) | private Task runValidation( method runInference (line 201) | @WorkerThread method initializeTfLite (line 212) | private Task initializeTfLite() { method validateBenchmarkOutputs (line 226) | private boolean validateBenchmarkOutputs( method createInterpreterOptions (line 236) | private Options createInterpreterOptions(ValidatedAccelerationConfigRe... method getValues (line 261) | private Object[] getValues(Map map) { method logTaskFailures (line 265) | private void logTaskFailures(Task task) { FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/logger/Logger.java type Logger (line 20) | public interface Logger { method error (line 22) | void error(String message, Exception e); method info (line 25) | void info(String message); method clear (line 28) | void clear(); FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/logger/TextViewLogger.java class TextViewLogger (line 28) | public class TextViewLogger implements Logger { method TextViewLogger (line 35) | public TextViewLogger(AppCompatActivity activity, TextView output) { method error (line 40) | @Override method info (line 45) | @Override method clear (line 50) | @Override method logEvent (line 56) | @UiThread FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/model/AssetModel.java type AssetModel (line 24) | public interface AssetModel { method getModel (line 27) | Model getModel(); method getBatchSize (line 30) | int getBatchSize(); method getInputs (line 33) | Object[] getInputs(); method allocateOutputs (line 36) | Map allocateOutputs(); method validateBenchmarkOutputs (line 39) | boolean validateBenchmarkOutputs(ByteBuffer[] outputs); method validateInterpreterOutputs (line 42) | boolean validateInterpreterOutputs(Object[] outputs); FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/model/AssetModelFactory.java class AssetModelFactory (line 26) | public final class AssetModelFactory { method AssetModelFactory (line 32) | public AssetModelFactory(Context context, Executor executor, Logger lo... type ModelType (line 39) | public enum ModelType { method load (line 45) | public Task load(ModelType type) { FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/model/MobileNetV1.java class MobileNetV1 (line 48) | final class MobileNetV1 implements AssetModel { method MobileNetV1 (line 76) | public MobileNetV1(Context context, Logger logger) throws IOException { method getModel (line 88) | @Override method getBatchSize (line 93) | @Override method getInputs (line 98) | @Override method allocateOutputs (line 105) | @Override method validateBenchmarkOutputs (line 112) | @Override method validateInterpreterOutputs (line 123) | @Override method validatePredictions (line 134) | private boolean validatePredictions(float[] predictions) { method readImage (line 150) | private Bitmap readImage(String path) { method loadImage (line 158) | private TensorImage loadImage(final Bitmap bitmapBuffer) { method product (line 175) | private static final int product(int... values) { method toFloatArray (line 183) | private static float[] toFloatArray(FloatBuffer output) { method getTopKLabels (line 189) | private static List> getTopKLabels(float[] l... FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/model/PlainAddition.java class PlainAddition (line 31) | final class PlainAddition implements AssetModel { method PlainAddition (line 46) | public PlainAddition(Context context, Logger logger) throws IOException { method getModel (line 57) | @Override method getBatchSize (line 62) | @Override method getInputs (line 67) | @Override method allocateOutputs (line 80) | @Override method validateBenchmarkOutputs (line 89) | @Override method validateInterpreterOutputs (line 101) | @Override method validateOutput (line 117) | private boolean validateOutput(float[] input, float[] output) { method generateInput (line 140) | private static float generateInput(int x) { method product (line 144) | private static final int product(int... values) { method toFloatArray (line 152) | private static float[] toFloatArray(ByteBuffer output) { FILE: lite/examples/acceleration_service/android_play_services/app/src/main/java/org/tensorflow/lite/examples/accelerationservice/validator/MeanSquaredErrorValidator.java class MeanSquaredErrorValidator (line 29) | public class MeanSquaredErrorValidator implements AccuracyValidator { method MeanSquaredErrorValidator (line 34) | public MeanSquaredErrorValidator(Logger logger, double threshold) { method validate (line 44) | @Override method checkMeanSquaredError (line 74) | private boolean checkMeanSquaredError(FloatBuffer expected, FloatBuffe... FILE: lite/examples/audio_classification/raspberry_pi/classify.py function run (line 25) | def run(model: str, max_results: int, score_threshold: float, function main (line 92) | def main(): FILE: lite/examples/audio_classification/raspberry_pi/utils.py class Plotter (line 29) | class Plotter(object): method __init__ (line 35) | def __init__(self) -> None: method plot (line 50) | def plot(self, result) -> None: FILE: lite/examples/classification_by_retrieval/lib/labeled_image_helper.cc type tflite (line 28) | namespace tflite { type examples (line 29) | namespace examples { type cbr (line 30) | namespace cbr { function BuildFrameBufferFromImageData (line 43) | tflite::support::StatusOr> function AddLabeledImageFromPath (line 58) | absl::Status AddLabeledImageFromPath(ModelBuilder* model_builder, FILE: lite/examples/classification_by_retrieval/lib/labeled_image_helper.h function namespace (line 25) | namespace tflite { FILE: lite/examples/classification_by_retrieval/lib/model_builder.cc type tflite (line 14) | namespace tflite { type examples (line 15) | namespace examples { type cbr (line 16) | namespace cbr { FILE: lite/examples/classification_by_retrieval/lib/model_builder.h function namespace (line 32) | namespace tflite { FILE: lite/examples/classification_by_retrieval/lib/tflite_builder.cc type tflite (line 32) | namespace tflite { type examples (line 33) | namespace examples { type cbr (line 34) | namespace cbr { function BuiltinOperator (line 43) | BuiltinOperator GetBuiltinCode(const OperatorCodeT& op_code) { function CreateQuantizationParameters (line 48) | Offset CreateQuantizationParameters( class TfLiteBuilderImpl (line 58) | class TfLiteBuilderImpl : public TfLiteBuilder { method AddTensor (line 70) | int AddTensor(const std::string& name, TensorType type, method AddQuantizedTensor (line 75) | int AddQuantizedTensor( method AddConstTensor (line 82) | int AddConstTensor(const std::string& name, TensorType type, method AddQuantizedConstTensor (line 88) | int AddQuantizedConstTensor( method TfLiteBuilderImpl (line 106) | explicit TfLiteBuilderImpl(FlatBufferBuilder* fbb) : fbb_(fbb) {} FILE: lite/examples/classification_by_retrieval/lib/tflite_builder.h function namespace (line 26) | namespace tflite { FILE: lite/examples/classification_by_retrieval/lib/tflite_cbr_builder.cc type tflite (line 28) | namespace tflite { type examples (line 29) | namespace examples { type cbr (line 30) | namespace cbr { function FeatureVector (line 37) | FeatureVector Normalize(const FeatureVector& fv) { function AddRetrievalBlock (line 49) | int AddRetrievalBlock(flatbuffers::FlatBufferBuilder* fb_builder, function AddQuantizedRetrievalBlock (line 101) | int AddQuantizedRetrievalBlock(flatbuffers::FlatBufferBuilder* fb_... function AddAggregationBlock (line 217) | int AddAggregationBlock(flatbuffers::FlatBufferBuilder* fb_builder, FILE: lite/examples/classification_by_retrieval/lib/tflite_cbr_builder.h function namespace (line 26) | namespace tflite { FILE: lite/examples/gesture_classification/web/controller_dataset.js class ControllerDataset (line 21) | class ControllerDataset { method constructor (line 22) | constructor() { method addExample (line 32) | addExample(example, label) { method addLabels (line 51) | addLabels(numClasses) { FILE: lite/examples/gesture_classification/web/index.js function loadMobilenet (line 31) | async function loadMobilenet() { function train (line 59) | async function train() { function predict (line 139) | async function predict() { function init (line 188) | async function init() { FILE: lite/examples/gesture_classification/web/ui.js constant CONTROLS (line 19) | const CONTROLS = [ function hideAllDropdowns (line 53) | function function removeActiveClass (line 127) | function removeActiveClass() { function timeout (line 197) | function timeout(ms) { FILE: lite/examples/gesture_classification/web/webcam.js class Webcam (line 21) | class Webcam { method constructor (line 26) | constructor(webcamElement) { method capture (line 36) | capture() { method cropImage (line 62) | cropImage(img) { method adjustVideoSize (line 79) | adjustVideoSize(width, height) { method setup (line 88) | async setup() { FILE: lite/examples/image_classification/android_java/app/src/androidTest/java/org/tensorflow/lite/examples/imageclassification/ImageClassificationTest.java class ImageClassificationTest (line 42) | @RunWith(AndroidJUnit4.class) method classificationResultsShouldNotChange (line 48) | @Test method loadImage (line 84) | private Bitmap loadImage(String fileName) { FILE: lite/examples/image_classification/android_java/app/src/main/java/org/tensorflow/lite/examples/imageclassification/ImageClassifierHelper.java class ImageClassifierHelper (line 34) | public class ImageClassifierHelper { method ImageClassifierHelper (line 54) | public ImageClassifierHelper(Float threshold, method create (line 71) | public static ImageClassifierHelper create( method getThreshold (line 86) | public float getThreshold() { method setThreshold (line 90) | public void setThreshold(float threshold) { method getNumThreads (line 94) | public int getNumThreads() { method setNumThreads (line 98) | public void setNumThreads(int numThreads) { method getMaxResults (line 102) | public int getMaxResults() { method setMaxResults (line 106) | public void setMaxResults(int maxResults) { method setCurrentDelegate (line 110) | public void setCurrentDelegate(int currentDelegate) { method setCurrentModel (line 114) | public void setCurrentModel(int currentModel) { method setupImageClassifier (line 118) | private void setupImageClassifier() { method classify (line 174) | public void classify(Bitmap image, int imageRotation) { method clearImageClassifier (line 202) | public void clearImageClassifier() { type ClassifierListener (line 207) | public interface ClassifierListener { method onError (line 208) | void onError(String error); method onResults (line 210) | void onResults(List results, long inferenceTime); FILE: lite/examples/image_classification/android_java/app/src/main/java/org/tensorflow/lite/examples/imageclassification/MainActivity.java class MainActivity (line 26) | public class MainActivity extends AppCompatActivity { method onCreate (line 28) | @Override method onBackPressed (line 35) | @Override FILE: lite/examples/image_classification/android_java/app/src/main/java/org/tensorflow/lite/examples/imageclassification/fragments/CameraFragment.java class CameraFragment (line 52) | public class CameraFragment extends Fragment method onCreateView (line 69) | @Nullable method onResume (line 79) | @Override method onDestroyView (line 91) | @Override method onViewCreated (line 102) | @Override method onConfigurationChanged (line 125) | @Override method initBottomSheetControls (line 133) | private void initBottomSheetControls() { method updateControlsUi (line 246) | private void updateControlsUi() { method setUpCamera (line 263) | private void setUpCamera() { method bindCameraUseCases (line 279) | private void bindCameraUseCases() { method classifyImage (line 337) | private void classifyImage(@NonNull ImageProxy image) { method onError (line 350) | @Override method onResults (line 358) | @Override FILE: lite/examples/image_classification/android_java/app/src/main/java/org/tensorflow/lite/examples/imageclassification/fragments/ClassificationResultAdapter.java class ClassificationResultAdapter (line 34) | public class ClassificationResultAdapter method updateResults (line 40) | @SuppressLint("NotifyDataSetChanged") method updateAdapterSize (line 57) | public void updateAdapterSize(int size) { method onCreateViewHolder (line 61) | @NonNull method onBindViewHolder (line 69) | @Override method getItemCount (line 74) | @Override class ViewHolder (line 80) | public static class ViewHolder extends RecyclerView.ViewHolder { method ViewHolder (line 84) | public ViewHolder(@NonNull ItemClassificationResultBinding binding) { method bind (line 90) | public void bind(Category category) { FILE: lite/examples/image_classification/android_java/app/src/main/java/org/tensorflow/lite/examples/imageclassification/fragments/PermissionsFragment.java class PermissionsFragment (line 31) | public class PermissionsFragment extends Fragment { method hasPermission (line 37) | public static boolean hasPermission(Context context) { method onStart (line 59) | @Override method navigateToCamera (line 70) | private void navigateToCamera() { FILE: lite/examples/image_classification/android_play_services/app/src/java/java/org/tensorflow/lite/examples/classification/playservices/CameraActivity.java class CameraActivity (line 57) | public final class CameraActivity extends AppCompatActivity { method onCreate (line 76) | @Override method startInitialization (line 118) | private void startInitialization(boolean isGpuInitialized) { method onDestroy (line 134) | @Override method onResume (line 153) | @Override method bindCameraUseCases (line 166) | @SuppressLint("UnsafeExperimentalUsageError") class ClassificationAnalyzer (line 234) | private class ClassificationAnalyzer implements Analyzer { method analyze (line 238) | @Override method reportRecognition (line 277) | private void reportRecognition(List recognitions) { method setUpCameraCaptureButton (line 304) | private View.OnClickListener setUpCameraCaptureButton() { method requestPermission (line 336) | private ActivityResultLauncher requestPermission() { method hasPermission (line 349) | private boolean hasPermission(Context context) { FILE: lite/examples/image_classification/android_play_services/app/src/java/java/org/tensorflow/lite/examples/classification/playservices/ImageClassificationHelper.java class ImageClassificationHelper (line 50) | class ImageClassificationHelper implements Closeable { class Recognition (line 71) | public static class Recognition { method Recognition (line 75) | public Recognition(String title, Float confidence) { method getTitle (line 80) | public String getTitle() { method getConfidence (line 84) | public Float getConfidence() { method create (line 94) | public static ImageClassificationHelper create( method ImageClassificationHelper (line 137) | private ImageClassificationHelper( method classify (line 151) | public List classify(final Bitmap bitmapBuffer, int image... method close (line 168) | @Override method loadImage (line 174) | private TensorImage loadImage(final Bitmap bitmapBuffer, int imageRota... method getTopKProbability (line 196) | private static List getTopKProbability( FILE: lite/examples/image_classification/metadata/metadata_writer_for_image_classifier.py function define_flags (line 36) | def define_flags(): class ModelSpecificInfo (line 47) | class ModelSpecificInfo(object): method __init__ (line 50) | def __init__(self, name, version, image_width, image_height, image_min, class MetadataPopulatorForImageClassifier (line 80) | class MetadataPopulatorForImageClassifier(object): method __init__ (line 83) | def __init__(self, model_file, model_info, label_file_path): method populate (line 89) | def populate(self): method _create_metadata (line 94) | def _create_metadata(self): method _populate_metadata (line 165) | def _populate_metadata(self): function main (line 173) | def main(_): FILE: lite/examples/image_classification/raspberry_pi/classify.py function run (line 34) | def run(model: str, max_results: int, score_threshold: float, num_thread... function main (line 119) | def main(): FILE: lite/examples/image_segmentation/raspberry_pi/segment.py function run (line 42) | def run(model: str, display_mode: str, num_threads: int, enable_edgetpu:... function visualize (line 123) | def visualize(input_image: np.ndarray, segmentation_map_image: np.ndarray, function main (line 182) | def main(): FILE: lite/examples/image_segmentation/raspberry_pi/utils.py function segmentation_map_to_image (line 22) | def segmentation_map_to_image( FILE: lite/examples/model_personalization/transfer_learning/generate_training_model.py class TransferLearningModel (line 29) | class TransferLearningModel(tf.Module): method __init__ (line 32) | def __init__(self, learning_rate=0.001): method load (line 62) | def load(self, feature): method train (line 81) | def train(self, bottleneck, label): method infer (line 105) | def infer(self, feature): method save (line 122) | def save(self, checkpoint_path): method restore (line 141) | def restore(self, checkpoint_path): method initialize_weights (line 168) | def initialize_weights(self): function convert_and_save (line 179) | def convert_and_save(saved_model_dir='saved_model'): FILE: lite/examples/native_api/android_play_services/c_api/app/src/androidTest/java/com/google/samples/gms/tflite/c/instrumentation/BasicScenarioTest.java class BasicScenarioTest (line 33) | @RunWith(AndroidJUnit4.class) method basicScenario (line 37) | @Test FILE: lite/examples/native_api/android_play_services/c_api/app/src/androidTest/java/com/google/samples/gms/tflite/c/instrumentation/TfLiteNativeGPUAccelerationTest.java class TfLiteNativeGPUAccelerationTest (line 37) | @RunWith(AndroidJUnit4.class) method setUp (line 46) | @Before method doInferenceWithAcceleration (line 54) | @Test FILE: lite/examples/native_api/android_play_services/c_api/app/src/main/cpp/com_google_samples_gms_tflite_c_TfLiteJni.cc function LogToCallback (line 46) | void LogToCallback(JNIEnv* env, jobject tfliteJni, const char* messageFo... function Java_com_google_samples_gms_tflite_c_TfLiteJni_initGpuAcceleration (line 63) | void function Java_com_google_samples_gms_tflite_c_TfLiteJni_loadModel (line 81) | void Java_com_google_samples_gms_tflite_c_TfLiteJni_loadModel( function jfloatArray (line 99) | jfloatArray function Java_com_google_samples_gms_tflite_c_TfLiteJni_destroy (line 130) | void Java_com_google_samples_gms_tflite_c_TfLiteJni_destroy( function TfLiteInterpreter (line 149) | TfLiteInterpreter* CreateInterpreterFromModel(JNIEnv* env, jobject callb... function TfLiteTensor (line 173) | TfLiteTensor* GetAndValidateInputTensor(JNIEnv* env, jobject tfliteJni, function TfLiteTensor (line 204) | const TfLiteTensor* GetAndValidateOutputTensor(JNIEnv* env, jobject tfli... FILE: lite/examples/native_api/android_play_services/c_api/app/src/main/cpp/java_interop.h function namespace (line 25) | namespace util { FILE: lite/examples/native_api/android_play_services/c_api/app/src/main/cpp/logging_assert.h function namespace (line 43) | namespace logging { FILE: lite/examples/native_api/android_play_services/c_api/app/src/main/java/com/google/samples/gms/tflite/c/MainActivity.java class MainActivity (line 35) | public class MainActivity extends Activity { method onCreate (line 43) | @Override method onStart (line 53) | @Override method runScenario (line 59) | private void runScenario() { method logEvent (line 101) | private void logEvent(String message) { method logEvent (line 105) | private void logEvent(String message, @Nullable Throwable throwable) { FILE: lite/examples/native_api/android_play_services/c_api/app/src/main/java/com/google/samples/gms/tflite/c/TfLiteJni.java class TfLiteJni (line 22) | public class TfLiteJni { type LoggingCallback (line 29) | public interface LoggingCallback { method printLogMessage (line 30) | void printLogMessage(String message); method TfLiteJni (line 37) | public TfLiteJni(LoggingCallback loggingCallback) { method sendLogMessage (line 41) | private void sendLogMessage(String message) { method initGpuAcceleration (line 48) | public native void initGpuAcceleration(); method loadModel (line 54) | public native void loadModel(AssetManager assetManager, String assetNa... method runInference (line 57) | public native float[] runInference(float[] input); method destroy (line 60) | public native void destroy(); FILE: lite/examples/native_api/android_play_services/cc_api/app/src/androidTest/java/com/google/samples/gms/tflite/c/instrumentation/BasicScenarioTest.java class BasicScenarioTest (line 33) | @RunWith(AndroidJUnit4.class) method basicScenario (line 37) | @Test FILE: lite/examples/native_api/android_play_services/cc_api/app/src/androidTest/java/com/google/samples/gms/tflite/c/instrumentation/TfLiteNativeGPUAccelerationTest.java class TfLiteNativeGPUAccelerationTest (line 37) | @RunWith(AndroidJUnit4.class) method setUp (line 46) | @Before method doInferenceWithAcceleration (line 54) | @Test FILE: lite/examples/native_api/android_play_services/cc_api/app/src/main/cpp/com_google_samples_gms_tflite_cc_TfLiteJni.cc function LogToCallback (line 55) | void LogToCallback(JNIEnv* env, jobject tfliteJni, const char* messageFo... function Java_com_google_samples_gms_tflite_cc_TfLiteJni_initGpuAcceleration (line 72) | void function Java_com_google_samples_gms_tflite_cc_TfLiteJni_loadModel (line 95) | void Java_com_google_samples_gms_tflite_cc_TfLiteJni_loadModel( function jfloatArray (line 115) | jfloatArray function Java_com_google_samples_gms_tflite_cc_TfLiteJni_destroy (line 145) | void Java_com_google_samples_gms_tflite_cc_TfLiteJni_destroy( function CreateInterpreterFromModel (line 163) | std::unique_ptr CreateInterpreterFromModel( function TfLiteTensor (line 198) | TfLiteTensor* GetAndValidateInputTensor(JNIEnv* env, jobject tfliteJni, function TfLiteTensor (line 229) | const TfLiteTensor* GetAndValidateOutputTensor( FILE: lite/examples/native_api/android_play_services/cc_api/app/src/main/cpp/java_interop.h function namespace (line 25) | namespace util { FILE: lite/examples/native_api/android_play_services/cc_api/app/src/main/cpp/logging_assert.h function namespace (line 43) | namespace logging { FILE: lite/examples/native_api/android_play_services/cc_api/app/src/main/java/com/google/samples/gms/tflite/cc/MainActivity.java class MainActivity (line 35) | public class MainActivity extends Activity { method onCreate (line 43) | @Override method onStart (line 53) | @Override method runScenario (line 59) | private void runScenario() { method logEvent (line 101) | private void logEvent(String message) { method logEvent (line 105) | private void logEvent(String message, @Nullable Throwable throwable) { FILE: lite/examples/native_api/android_play_services/cc_api/app/src/main/java/com/google/samples/gms/tflite/cc/TfLiteJni.java class TfLiteJni (line 22) | public class TfLiteJni { type LoggingCallback (line 29) | public interface LoggingCallback { method printLogMessage (line 30) | void printLogMessage(String message); method TfLiteJni (line 37) | public TfLiteJni(LoggingCallback loggingCallback) { method sendLogMessage (line 41) | private void sendLogMessage(String message) { method initGpuAcceleration (line 48) | public native void initGpuAcceleration(); method loadModel (line 54) | public native void loadModel(AssetManager assetManager, String assetNa... method runInference (line 57) | public native float[] runInference(float[] input); method destroy (line 60) | public native void destroy(); FILE: lite/examples/object_detection/raspberry_pi/detect.py function run (line 26) | def run(model: str, camera_id: int, width: int, height: int, num_threads... function main (line 109) | def main(): FILE: lite/examples/object_detection/raspberry_pi/utils.py function visualize (line 27) | def visualize( FILE: lite/examples/pose_estimation/raspberry_pi/data.py class BodyPart (line 22) | class BodyPart(enum.Enum): class Point (line 43) | class Point(NamedTuple): class Rectangle (line 49) | class Rectangle(NamedTuple): class KeyPoint (line 55) | class KeyPoint(NamedTuple): class Person (line 62) | class Person(NamedTuple): function person_from_keypoints_with_scores (line 70) | def person_from_keypoints_with_scores( class Category (line 117) | class Category(NamedTuple): FILE: lite/examples/pose_estimation/raspberry_pi/ml/classifier.py class Classifier (line 33) | class Classifier(object): method __init__ (line 36) | def __init__(self, model_name: str, label_file: str) -> None: method _load_labels (line 59) | def _load_labels(self, label_path: str) -> List[str]: method classify_pose (line 71) | def classify_pose(self, person: Person) -> List[Category]: FILE: lite/examples/pose_estimation/raspberry_pi/ml/classifier_test.py class ClassifierTest (line 28) | class ClassifierTest(unittest.TestCase): method test_pose_classification (line 30) | def test_pose_classification(self): FILE: lite/examples/pose_estimation/raspberry_pi/ml/movenet.py class Movenet (line 36) | class Movenet(object): method __init__ (line 45) | def __init__(self, model_name: str) -> None: method init_crop_region (line 70) | def init_crop_region(self, image_height: int, method _torso_visible (line 107) | def _torso_visible(self, keypoints: np.ndarray) -> bool: method _determine_torso_and_body_range (line 132) | def _determine_torso_and_body_range(self, keypoints: np.ndarray, method _determine_crop_region (line 183) | def _determine_crop_region(self, keypoints: np.ndarray, image_height: ... method _crop_and_resize (line 257) | def _crop_and_resize( method _run_detector (line 285) | def _run_detector( method detect (line 322) | def detect(self, FILE: lite/examples/pose_estimation/raspberry_pi/ml/movenet_multipose.py class MoveNetMultiPose (line 42) | class MoveNetMultiPose(object): method __init__ (line 45) | def __init__(self, method detect (line 87) | def detect(self, method _postprocess (line 131) | def _postprocess(self, keypoints_with_scores: np.ndarray, image_height... FILE: lite/examples/pose_estimation/raspberry_pi/ml/movenet_multipose_test.py class MovenetMultiPoseTest (line 34) | class MovenetMultiPoseTest(unittest.TestCase): method setUp (line 36) | def setUp(self): method _assert (line 65) | def _assert(self, keypoints: List[KeyPoint], method test_pose_estimation_image1_multipose (line 86) | def test_pose_estimation_image1_multipose(self): method test_pose_estimation_image2_multipose (line 91) | def test_pose_estimation_image2_multipose(self): FILE: lite/examples/pose_estimation/raspberry_pi/ml/movenet_test.py class MovenetTest (line 33) | class MovenetTest(unittest.TestCase): method setUp (line 35) | def setUp(self): method _detect_and_assert (line 50) | def _detect_and_assert(self, detector: Movenet, image: np.ndarray, method test_pose_estimation_image1_lightning (line 74) | def test_pose_estimation_image1_lightning(self): method test_pose_estimation_image1_thunder (line 79) | def test_pose_estimation_image1_thunder(self): method test_pose_estimation_image2_lightning (line 84) | def test_pose_estimation_image2_lightning(self): method test_pose_estimation_image2_thunder (line 89) | def test_pose_estimation_image2_thunder(self): FILE: lite/examples/pose_estimation/raspberry_pi/ml/posenet.py class Posenet (line 34) | class Posenet(object): method __init__ (line 37) | def __init__(self, model_name: str) -> None: method detect (line 61) | def detect(self, input_image: np.ndarray) -> Person: method _sigmoid (line 104) | def _sigmoid(self, x: np.ndarray) -> float: method _process_output (line 107) | def _process_output(self, heatmap_data: np.ndarray, FILE: lite/examples/pose_estimation/raspberry_pi/ml/posenet_test.py class PosenetTest (line 32) | class PosenetTest(unittest.TestCase): method setUp (line 34) | def setUp(self): method _detect_and_assert (line 49) | def _detect_and_assert(self, detector: Posenet, image: np.ndarray, method test_pose_estimation_image1 (line 72) | def test_pose_estimation_image1(self): method test_pose_estimation_image2 (line 76) | def test_pose_estimation_image2(self): FILE: lite/examples/pose_estimation/raspberry_pi/pose_estimation.py function run (line 28) | def run(estimation_model: str, tracker_type: str, classification_model: ... function main (line 157) | def main(): FILE: lite/examples/pose_estimation/raspberry_pi/tracker/bounding_box_tracker.py class BoundingBoxTracker (line 23) | class BoundingBoxTracker(Tracker): method _compute_similarity (line 29) | def _compute_similarity(self, persons: List[Person]) -> List[List[floa... method _iou (line 50) | def _iou(self, person: Person, track: Track) -> float: FILE: lite/examples/pose_estimation/raspberry_pi/tracker/bounding_box_tracker_test.py class BoundingBoxTrackerTest (line 31) | class BoundingBoxTrackerTest(unittest.TestCase): method setUp (line 33) | def setUp(self): method test_iou (line 39) | def test_iou(self): method test_iou_full_overlap (line 47) | def test_iou_full_overlap(self): method test_iou_no_intersection (line 54) | def test_iou_no_intersection(self): method test_bounding_box_tracker (line 62) | def test_bounding_box_tracker(self): FILE: lite/examples/pose_estimation/raspberry_pi/tracker/config.py class KeypointTrackerConfig (line 18) | class KeypointTrackerConfig(NamedTuple): class TrackerConfig (line 44) | class TrackerConfig(NamedTuple): FILE: lite/examples/pose_estimation/raspberry_pi/tracker/keypoint_tracker.py class KeypointTracker (line 24) | class KeypointTracker(Tracker): method _compute_similarity (line 31) | def _compute_similarity(self, persons: List[Person]) -> List[List[floa... method _object_keypoint_similarity (line 52) | def _object_keypoint_similarity(self, person: Person, track: Track) ->... method _area (line 101) | def _area(self, track: Track) -> float: FILE: lite/examples/pose_estimation/raspberry_pi/tracker/keypoint_tracker_test.py class KeypointTrackerTest (line 34) | class KeypointTrackerTest(unittest.TestCase): method setUp (line 36) | def setUp(self): method test_oks (line 44) | def test_oks(self): method test_oks_returns_zero (line 69) | def test_oks_returns_zero(self): method test_area (line 88) | def test_area(self): method test_keypoint_tracker (line 102) | def test_keypoint_tracker(self): FILE: lite/examples/pose_estimation/raspberry_pi/tracker/tracker.py class Track (line 23) | class Track(NamedTuple): class Tracker (line 31) | class Tracker(object): method __init__ (line 38) | def __init__(self, config: TrackerConfig) -> None: method apply (line 44) | def apply(self, persons: List[Person], timestamp: int) -> List[Person]: method _compute_similarity (line 62) | def _compute_similarity(self, persons: List[Person]) -> List[List[floa... method _filter_old_tracks (line 74) | def _filter_old_tracks(self, timestamp: int) -> List[Track]: method _assign_tracks (line 89) | def _assign_tracks(self, persons: List[Person], sim_matrix: List[List[... method _update_tracks (line 144) | def _update_tracks(self) -> None: method _create_track (line 163) | def _create_track(self, method _update_and_get_next_track_id (line 184) | def _update_and_get_next_track_id(self): method _remove (line 189) | def _remove(self, ids: List[str]) -> None: method _reset (line 193) | def _reset(self) -> None: FILE: lite/examples/pose_estimation/raspberry_pi/utils.py function visualize (line 62) | def visualize( function keep_aspect_ratio_resizer (line 127) | def keep_aspect_ratio_resizer( FILE: lite/examples/pose_estimation/raspberry_pi/visualizer.py function _visualize_detection_result (line 48) | def _visualize_detection_result(input_image, ground_truth): function _create_ground_truth_csv (line 93) | def _create_ground_truth_csv(input_images, ground_truth_csv_path): function main (line 127) | def main(): FILE: lite/examples/posenet/android/posenet/src/androidTest/java/org/tensorflow/lite/examples/posenet/ExampleInstrumentedTest.java class ExampleInstrumentedTest (line 32) | @RunWith(AndroidJUnit4.class) method useAppContext (line 34) | @Test FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/Config.java class Config (line 24) | public final class Config { class Feature (line 40) | public static class Feature { method Config (line 77) | public Config() {} method validate (line 79) | public boolean validate() { method useGenres (line 110) | public boolean useGenres() { FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/MainActivity.java class MainActivity (line 33) | public class MainActivity extends AppCompatActivity method onCreate (line 48) | @Override method onStart (line 78) | @Override method onStop (line 94) | @Override method recommend (line 105) | private void recommend(final List movies) { method showResult (line 118) | private void showResult(final List recommendations) { method onItemSelectionChange (line 123) | @Override method onClickRecommendedMovie (line 151) | @Override FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/MovieFragment.java class MovieFragment (line 37) | public class MovieFragment extends Fragment { method MovieFragment (line 49) | public MovieFragment() {} method newInstance (line 51) | @SuppressWarnings("unused") method onCreate (line 60) | @Override method onCreateView (line 69) | @Override method setMovies (line 88) | public void setMovies(List movies) { method onAttach (line 93) | @Override method onDetach (line 104) | @Override type OnListFragmentInteractionListener (line 119) | public interface OnListFragmentInteractionListener { method onItemSelectionChange (line 120) | void onItemSelectionChange(MovieItem item); FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/MovieRecyclerViewAdapter.java class MovieRecyclerViewAdapter (line 33) | public class MovieRecyclerViewAdapter method MovieRecyclerViewAdapter (line 38) | public MovieRecyclerViewAdapter( method onCreateViewHolder (line 44) | @Override method onBindViewHolder (line 52) | @Override method getItemCount (line 81) | @Override class ViewHolder (line 87) | public static class ViewHolder extends RecyclerView.ViewHolder { method ViewHolder (line 95) | public ViewHolder(View view, OnListFragmentInteractionListener liste... method setSelected (line 103) | public void setSelected(boolean selected) { method toString (line 113) | @Override FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/RecommendationClient.java class RecommendationClient (line 37) | public class RecommendationClient { class Result (line 48) | public static class Result { method Result (line 59) | public Result(final int id, final MovieItem item, final float confid... method toString (line 65) | @Override method RecommendationClient (line 71) | public RecommendationClient(Context context, Config config) { method load (line 81) | @WorkerThread method loadModel (line 91) | @WorkerThread method loadCandidateList (line 103) | @WorkerThread method loadGenreList (line 120) | @WorkerThread method unload (line 136) | @WorkerThread method preprocessIds (line 142) | int[] preprocessIds(List selectedMovies, int length) { method preprocessGenres (line 156) | int[] preprocessGenres(List selectedMovies, int length) { method preprocess (line 177) | @WorkerThread method postprocess (line 198) | @WorkerThread method recommend (line 229) | @WorkerThread method getTflite (line 244) | Interpreter getTflite() { FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/RecommendationFragment.java class RecommendationFragment (line 38) | public class RecommendationFragment extends Fragment { method RecommendationFragment (line 50) | public RecommendationFragment() {} method newInstance (line 53) | @SuppressWarnings("unused") method onCreate (line 62) | @Override method onCreateView (line 71) | @Override method setRecommendations (line 90) | public void setRecommendations(List recommendedMovies) { method onAttach (line 96) | @Override method onDetach (line 107) | @Override type OnListFragmentInteractionListener (line 122) | public interface OnListFragmentInteractionListener { method onClickRecommendedMovie (line 123) | void onClickRecommendedMovie(MovieItem item); FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/RecommendationRecyclerViewAdapter.java class RecommendationRecyclerViewAdapter (line 32) | public class RecommendationRecyclerViewAdapter method RecommendationRecyclerViewAdapter (line 38) | public RecommendationRecyclerViewAdapter( method onCreateViewHolder (line 44) | @Override method onBindViewHolder (line 52) | @Override method getItemCount (line 73) | @Override class ViewHolder (line 79) | public static class ViewHolder extends RecyclerView.ViewHolder { method ViewHolder (line 86) | public ViewHolder(View view) { method toString (line 94) | @Override FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/data/FileUtil.java class FileUtil (line 40) | public class FileUtil { method FileUtil (line 42) | private FileUtil() {} method loadModelFile (line 45) | public static MappedByteBuffer loadModelFile(AssetManager assetManager... method loadMovieList (line 57) | public static Collection loadMovieList( method loadGenreList (line 65) | public static List loadGenreList(AssetManager assetManager, St... method loadConfig (line 73) | public static Config loadConfig(AssetManager assetManager, String conf... method loadFileContent (line 81) | private static String loadFileContent(AssetManager assetManager, Strin... FILE: lite/examples/recommendation/android/app/src/main/java/org/tensorflow/lite/examples/recommendation/data/MovieItem.java class MovieItem (line 23) | public class MovieItem { method MovieItem (line 35) | private MovieItem() { method MovieItem (line 39) | public MovieItem(int id, String title, List genres, int count) { method toString (line 46) | @Override FILE: lite/examples/recommendation/ml/configs/model_config.py class ModelConfig (line 20) | class ModelConfig(object): FILE: lite/examples/recommendation/ml/data/example_generation_movielens.py function define_flags (line 62) | def define_flags(): class MovieInfo (line 82) | class MovieInfo( method __new__ (line 88) | def __new__(cls, function download_and_extract_data (line 98) | def download_and_extract_data(data_directory, function read_data (line 130) | def read_data(data_directory, min_rating=None): function convert_to_timelines (line 148) | def convert_to_timelines(ratings_df): function generate_movies_dict (line 163) | def generate_movies_dict(movies_df): function extract_year_from_title (line 173) | def extract_year_from_title(title): function generate_feature_of_movie_years (line 180) | def generate_feature_of_movie_years(movies_dict, movies): function generate_movie_genres (line 188) | def generate_movie_genres(movies_dict, movies): function _pad_or_truncate_movie_feature (line 213) | def _pad_or_truncate_movie_feature(feature, max_len, pad_value): function generate_examples_from_single_timeline (line 218) | def generate_examples_from_single_timeline(timeline, function generate_examples_from_timelines (line 278) | def generate_examples_from_timelines(timelines, function generate_movie_feature_vocabs (line 334) | def generate_movie_feature_vocabs(movies_df, movie_counts): function write_tfrecords (line 369) | def write_tfrecords(tf_examples, filename): function write_vocab_json (line 380) | def write_vocab_json(vocab, filename): function write_vocab_txt (line 386) | def write_vocab_txt(vocab, filename): function generate_datasets (line 392) | def generate_datasets(extracted_data_dir, function main (line 459) | def main(_): FILE: lite/examples/recommendation/ml/data/example_generation_movielens_test.py class ExampleGenerationMovielensTest (line 226) | class ExampleGenerationMovielensTest(tf.test.TestCase): method test_example_generation (line 228) | def test_example_generation(self): method test_vocabs_generation (line 244) | def test_vocabs_generation(self): FILE: lite/examples/recommendation/ml/model/context_encoder.py function safe_div (line 24) | def safe_div(x, y): class ContextEncoder (line 28) | class ContextEncoder(tf.keras.layers.Layer): method __init__ (line 39) | def __init__(self, method call (line 82) | def call(self, input_context: Dict[str, tf.Tensor]) -> tf.Tensor: class FeatureGroupEncoder (line 109) | class FeatureGroupEncoder(tf.keras.layers.Layer): method __init__ (line 118) | def __init__(self, method call (line 173) | def call(self, input_context: Dict[str, tf.Tensor]) -> tf.Tensor: FILE: lite/examples/recommendation/ml/model/context_encoder_test.py class ContextEncoderTest (line 22) | class ContextEncoderTest(tf.test.TestCase): method _create_test_feature_group (line 24) | def _create_test_feature_group(self, method _create_test_input_config (line 39) | def _create_test_input_config(self): method _create_test_model_config (line 65) | def _create_test_model_config(self): method test_feature_group_encoder_bow (line 73) | def test_feature_group_encoder_bow(self): method test_feature_group_encoder_cnn (line 88) | def test_feature_group_encoder_cnn(self): method test_feature_group_encoder_lstm (line 103) | def test_feature_group_encoder_lstm(self): method test_context_encoder (line 118) | def test_context_encoder(self): FILE: lite/examples/recommendation/ml/model/dotproduct_similarity.py class DotProductSimilarity (line 20) | class DotProductSimilarity(tf.keras.layers.Layer): method call (line 27) | def call(self, FILE: lite/examples/recommendation/ml/model/dotproduct_similarity_test.py class DotproductSimilarityTest (line 20) | class DotproductSimilarityTest(tf.test.TestCase): method test_dotproduct (line 22) | def test_dotproduct(self): FILE: lite/examples/recommendation/ml/model/input_pipeline.py class FeaturesAndVocabsByName (line 33) | class FeaturesAndVocabsByName( method __new__ (line 39) | def __new__(cls, features_by_name=None, vocabs_by_name=None): function _prepare_feature_vocab_table (line 45) | def _prepare_feature_vocab_table( function _get_features_vocabs_for_groups (line 82) | def _get_features_vocabs_for_groups( function get_features_and_vocabs_by_name (line 109) | def get_features_and_vocabs_by_name( function _get_feature_spec (line 145) | def _get_feature_spec(feature_type: input_config_pb2.FeatureType, function _get_serving_feature_spec (line 178) | def _get_serving_feature_spec(feature_name: str, function get_serving_input_specs (line 190) | def get_serving_input_specs( function decode_example (line 201) | def decode_example( function get_input_dataset (line 246) | def get_input_dataset(data_filepattern: str, FILE: lite/examples/recommendation/ml/model/input_pipeline_test.py class InputPipelineTest (line 106) | class InputPipelineTest(tf.test.TestCase): method _AssertSparseTensorValueEqual (line 108) | def _AssertSparseTensorValueEqual(self, a, b): method setUp (line 113) | def setUp(self): method test_features_vocabs_gen (line 126) | def test_features_vocabs_gen(self): method test_decode_example (line 139) | def test_decode_example(self): method test_get_input_dataset (line 161) | def test_get_input_dataset(self): method test_get_serving_input_specs (line 173) | def test_get_serving_input_specs(self): FILE: lite/examples/recommendation/ml/model/label_encoder.py class LabelEncoder (line 23) | class LabelEncoder(tf.keras.layers.Layer): method __init__ (line 31) | def __init__(self, method label_name (line 56) | def label_name(self): method encode (line 59) | def encode(self, input_label: tf.Tensor) -> tf.Tensor: method call (line 76) | def call(self, inputs: Dict[str, tf.Tensor]): FILE: lite/examples/recommendation/ml/model/label_encoder_test.py class LabelEncoderTest (line 21) | class LabelEncoderTest(tf.test.TestCase): method _create_test_input_config (line 23) | def _create_test_input_config(self): method test_label_encoder (line 48) | def test_label_encoder(self): FILE: lite/examples/recommendation/ml/model/losses.py class BatchSoftmax (line 22) | class BatchSoftmax(tf.keras.losses.Loss): method __init__ (line 29) | def __init__(self, name='batch_softmax', **kwargs): method call (line 33) | def call(self, y_true: tf.Tensor, y_pred: tf.Tensor): class GlobalSoftmax (line 55) | class GlobalSoftmax(tf.keras.losses.Loss): method __init__ (line 63) | def __init__(self, name='global_softmax', **kwargs): method call (line 67) | def call(self, y_true: tf.Tensor, y_pred: tf.Tensor): FILE: lite/examples/recommendation/ml/model/losses_test.py class KerasLossesTest (line 23) | class KerasLossesTest(tf.test.TestCase): method test_batch_softmax_loss (line 25) | def test_batch_softmax_loss(self): method test_global_softmax_loss (line 37) | def test_global_softmax_loss(self): FILE: lite/examples/recommendation/ml/model/metrics.py function _get_batch_similarities (line 22) | def _get_batch_similarities(batch_label, full_vocab_similarities): class BatchRecall (line 27) | class BatchRecall(tf.keras.metrics.Recall): method __init__ (line 30) | def __init__(self, top_k=1, name='batch_recall'): method update_state (line 33) | def update_state(self, y_true, y_pred, sample_weight=None): class GlobalRecall (line 51) | class GlobalRecall(tf.keras.metrics.Recall): method __init__ (line 54) | def __init__(self, top_k=1, name='global_recall'): method update_state (line 57) | def update_state(self, y_true, y_pred, sample_weight=None): class BatchMeanRank (line 75) | class BatchMeanRank(tf.keras.metrics.Mean): method __init__ (line 78) | def __init__(self, name='batch_mean_rank', **kwargs): method update_state (line 81) | def update_state(self, y_true, y_pred, sample_weight=None): # pytype:... class GlobalMeanRank (line 107) | class GlobalMeanRank(tf.keras.metrics.Mean): method __init__ (line 110) | def __init__(self, name='global_mean_rank', **kwargs): method update_state (line 113) | def update_state(self, y_true, y_pred, sample_weight=None): # pytype:... FILE: lite/examples/recommendation/ml/model/metrics_test.py class KerasMetricsTest (line 23) | class KerasMetricsTest(tf.test.TestCase): method test_batch_recall_and_mean_rank (line 25) | def test_batch_recall_and_mean_rank(self): method test_global_recall_and_mean_rank (line 39) | def test_global_recall_and_mean_rank(self): FILE: lite/examples/recommendation/ml/model/recommendation_model.py class RecommendationModel (line 24) | class RecommendationModel(tf.keras.Model): method __init__ (line 27) | def __init__(self, method call (line 49) | def call(self, inputs): # pytype: disable=signature-mismatch # overr... method serve (line 77) | def serve(self, **kwargs): FILE: lite/examples/recommendation/ml/model/recommendation_model_launcher.py function define_flags (line 35) | def define_flags(): class SimpleCheckpoint (line 77) | class SimpleCheckpoint(tf.keras.callbacks.Callback): method __init__ (line 80) | def __init__(self, checkpoint_manager): method on_epoch_end (line 84) | def on_epoch_end(self, epoch, logs=None): function _get_optimizer (line 89) | def _get_optimizer(learning_rate: float, gradient_clip_norm: float): function _get_metrics (line 95) | def _get_metrics(eval_top_k: List[int]): function compile_model (line 109) | def compile_model(model, eval_top_k, learning_rate, gradient_clip_norm): function build_keras_model (line 118) | def build_keras_model(input_config: input_config_pb2.InputConfig, function get_callbacks (line 141) | def get_callbacks(keras_model: tf.keras.Model, function train_and_eval (line 158) | def train_and_eval(model: tf.keras.Model, function save_model (line 178) | def save_model(checkpoint_path: str, export_dir: str, function export_tflite (line 203) | def export_tflite(export_dir): function export (line 216) | def export(checkpoint_path: str, input_config: input_config_pb2.InputCon... function load_input_config (line 241) | def load_input_config(): function prepare_model_config (line 248) | def prepare_model_config(): function main (line 259) | def main(_): FILE: lite/examples/recommendation/ml/model/recommendation_model_launcher_test.py class RecommendationModelLauncherTest (line 112) | class RecommendationModelLauncherTest(tf.test.TestCase): method _AssertSparseTensorValueEqual (line 114) | def _AssertSparseTensorValueEqual(self, a, b): method _assertInputDetail (line 119) | def _assertInputDetail(self, input_details, index, name, shape): method setUp (line 123) | def setUp(self): method testModelTrainEvalExport (line 153) | def testModelTrainEvalExport(self): FILE: lite/examples/recommendation/ml/model/recommendation_model_test.py class RecommendationModelTest (line 22) | class RecommendationModelTest(tf.test.TestCase): method _create_test_input_config (line 24) | def _create_test_input_config(self, method _create_test_model_config (line 50) | def _create_test_model_config(self): method test_model_train_bow (line 58) | def test_model_train_bow(self): method test_model_train_cnn (line 88) | def test_model_train_cnn(self): method test_model_train_lstm (line 118) | def test_model_train_lstm(self): FILE: lite/examples/recommendation/ml/model/utils.py function GetShardFilenames (line 29) | def GetShardFilenames(filepattern): function ClipGradient (line 51) | def ClipGradient( FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/BoardCellAdapter.java class BoardCellAdapter (line 27) | public class BoardCellAdapter extends BaseAdapter { method BoardCellAdapter (line 36) | public BoardCellAdapter( method getView (line 47) | @Override method getCount (line 73) | @Override method getItem (line 78) | @Override method getItemId (line 83) | @Override FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/BoardCellStatus.java type BoardCellStatus (line 20) | enum BoardCellStatus { FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/Constants.java class Constants (line 20) | public final class Constants { method Constants (line 34) | private Constants() {} FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/HiddenBoardCellStatus.java type HiddenBoardCellStatus (line 20) | enum HiddenBoardCellStatus { FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/MainActivity.java class MainActivity (line 35) | public class MainActivity extends AppCompatActivity { method onCreate (line 56) | @Override method initGame (line 161) | private void initGame() { method initBoard (line 174) | private void initBoard(BoardCellStatus[][] board) { method initHiddenBoard (line 180) | private void initHiddenBoard(HiddenBoardCellStatus[][] board) { method placePlaneOnHiddenBoard (line 186) | private void placePlaneOnHiddenBoard(HiddenBoardCellStatus[][] hiddenB... FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/PlaneStrikeAgent.java class PlaneStrikeAgent (line 28) | public abstract class PlaneStrikeAgent { method PlaneStrikeAgent (line 35) | public PlaneStrikeAgent(Activity activity) throws IOException { method predictNextMove (line 41) | protected abstract int predictNextMove(BoardCellStatus[][] board); method runInference (line 44) | protected abstract void runInference(); method prepareModelInput (line 46) | protected abstract void prepareModelInput(BoardCellStatus[][] board); method loadModelFile (line 49) | protected MappedByteBuffer loadModelFile(Activity activity) throws IOE... FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/RLAgent.java class RLAgent (line 29) | public class RLAgent extends PlaneStrikeAgent { method RLAgent (line 35) | public RLAgent(Activity activity) throws IOException { method predictNextMove (line 43) | @Override method runInference (line 70) | @Override method prepareModelInput (line 76) | @Override FILE: lite/examples/reinforcement_learning/android/app/src/main/java/org/tensorflow/lite/examples/reinforcementlearning/RLAgentFromTFAgents.java class RLAgentFromTFAgents (line 29) | public class RLAgentFromTFAgents extends PlaneStrikeAgent { method RLAgentFromTFAgents (line 33) | public RLAgentFromTFAgents(Activity activity) throws IOException { method predictNextMove (line 38) | @Override method runInference (line 54) | @Override method prepareModelInput (line 64) | @Override FILE: lite/examples/reinforcement_learning/ml/common.py function play_game (line 43) | def play_game(predict_fn): function compute_rewards (line 76) | def compute_rewards(game_result_log, gamma=GAMMA): function initialize_random_hidden_board (line 87) | def initialize_random_hidden_board(board_size): FILE: lite/examples/reinforcement_learning/ml/tf_agents/planestrike_py_environment.py class PlaneStrikePyEnvironment (line 59) | class PlaneStrikePyEnvironment(py_environment.PyEnvironment): method __init__ (line 62) | def __init__(self, method set_boards (line 83) | def set_boards(self): method current_time_step (line 89) | def current_time_step(self): method observation_spec (line 92) | def observation_spec(self): method action_spec (line 96) | def action_spec(self): method _reset (line 100) | def _reset(self): method _step (line 108) | def _step(self, action): method render (line 156) | def render(self, mode: "human") -> np.ndarray: FILE: lite/examples/reinforcement_learning/ml/tf_agents/training_tf_agents.py function compute_avg_return_and_steps (line 52) | def compute_avg_return_and_steps(environment, policy, num_episodes=10): function collect_episode (line 75) | def collect_episode(environment, policy, num_episodes, replay_buffer_obs... function train_agent (line 88) | def train_agent(iterations, modeldir, logdir, policydir): function main (line 197) | def main(argv: Sequence[str]) -> None: FILE: lite/examples/reinforcement_learning/ml/tf_and_jax/gym_planestrike/gym_planestrike/envs/planestrike.py class PlaneStrikeEnv (line 33) | class PlaneStrikeEnv(gym.Env): method __init__ (line 38) | def __init__(self, board_size) -> None: method step (line 44) | def step(self, action): method reset (line 72) | def reset(self): method render (line 76) | def render(self, mode='human'): method close (line 80) | def close(self): method set_board (line 83) | def set_board(self): FILE: lite/examples/reinforcement_learning/ml/tf_and_jax/training_jax.py class PolicyGradient (line 39) | class PolicyGradient(nn.Module): method __call__ (line 43) | def __call__(self, x): function create_optimizer (line 57) | def create_optimizer(learning_rate: float): function compute_loss (line 61) | def compute_loss(logits, labels, rewards): function train_step (line 68) | def train_step(model_optimizer, params, opt_state, game_board_log, function run_inference (line 87) | def run_inference(model_params, board): function train_agent (line 92) | def train_agent(iterations, modeldir, logdir): function main (line 144) | def main(argv: Sequence[str]) -> None: FILE: lite/examples/reinforcement_learning/ml/tf_and_jax/training_tf.py function train_agent (line 30) | def train_agent(iterations, modeldir, logdir): function main (line 82) | def main(argv: Sequence[str]) -> None: FILE: lite/examples/smart_reply/android/app/libs/cc/ops/extract_feature.cc type tflite (line 32) | namespace tflite { type ops (line 33) | namespace ops { type custom (line 34) | namespace custom { type extract (line 36) | namespace extract { function Equals (line 41) | bool Equals(const string& x, const tflite::StringRef& strref) { function IsValidNgram (line 52) | bool IsValidNgram(const tflite::StringRef& strref) { function TfLiteStatus (line 61) | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { function TfLiteStatus (line 79) | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { function TfLiteRegistration (line 114) | TfLiteRegistration* Register_EXTRACT_FEATURES() { FILE: lite/examples/smart_reply/android/app/libs/cc/ops/extract_feature_test.cc type tflite (line 25) | namespace tflite { type ops (line 27) | namespace ops { type custom (line 28) | namespace custom { class ExtractFeatureOpModel (line 35) | class ExtractFeatureOpModel : public SingleOpModel { method ExtractFeatureOpModel (line 37) | explicit ExtractFeatureOpModel(const std::vector& input) { method GetSignature (line 47) | std::vector GetSignature() { return ExtractVector(sign... method GetWeight (line 48) | std::vector GetWeight() { return ExtractVector(wei... function CalcFeature (line 56) | int CalcFeature(const string& str) { function TEST (line 60) | TEST(ExtractFeatureOpTest, RegularInput) { function TEST (line 70) | TEST(ExtractFeatureOpTest, OneInput) { function TEST (line 77) | TEST(ExtractFeatureOpTest, ZeroInput) { function TEST (line 84) | TEST(ExtractFeatureOpTest, AllBlacklistInput) { function main (line 96) | int main(int argc, char** argv) { FILE: lite/examples/smart_reply/android/app/libs/cc/ops/normalize.cc type tflite (line 35) | namespace tflite { type ops (line 36) | namespace ops { type custom (line 37) | namespace custom { type normalize (line 39) | namespace normalize { function TfLiteStatus (line 58) | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { function TfLiteRegistration (line 103) | TfLiteRegistration* Register_NORMALIZE() { FILE: lite/examples/smart_reply/android/app/libs/cc/ops/normalize_test.cc type tflite (line 25) | namespace tflite { type ops (line 27) | namespace ops { type custom (line 28) | namespace custom { class NormalizeOpModel (line 35) | class NormalizeOpModel : public SingleOpModel { method NormalizeOpModel (line 37) | explicit NormalizeOpModel(const string& input) { method GetStringOutput (line 46) | std::vector GetStringOutput() { function TEST (line 62) | TEST(NormalizeOpTest, RegularInput) { function TEST (line 69) | TEST(NormalizeOpTest, OneInput) { function TEST (line 75) | TEST(NormalizeOpTest, EmptyInput) { function main (line 86) | int main(int argc, char** argv) { FILE: lite/examples/smart_reply/android/app/libs/cc/ops/predict.cc type tflite (line 41) | namespace tflite { type ops (line 42) | namespace ops { type custom (line 43) | namespace custom { type predict (line 45) | namespace predict { type PredictOption (line 47) | struct PredictOption { method PredictOption (line 51) | static PredictOption* Cast(void* ptr) { function WeightGreater (line 56) | bool WeightGreater(const std::pair& a, function Free (line 76) | void Free(TfLiteContext* context, void* buffer) { function TfLiteStatus (line 80) | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { function TfLiteStatus (line 121) | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { function TfLiteRegistration (line 171) | TfLiteRegistration* Register_PREDICT() { FILE: lite/examples/smart_reply/android/app/libs/cc/ops/predict_test.cc type tflite (line 25) | namespace tflite { type ops (line 27) | namespace ops { type custom (line 28) | namespace custom { class PredictOpModel (line 35) | class PredictOpModel : public SingleOpModel { method PredictOpModel (line 37) | PredictOpModel(std::initializer_list input_signature_shape, method SetInputSignature (line 56) | void SetInputSignature(std::initializer_list data) { method SetModelKey (line 60) | void SetModelKey(std::initializer_list data) { method SetModelLabel (line 64) | void SetModelLabel(std::initializer_list data) { method SetModelWeight (line 68) | void SetModelWeight(std::initializer_list data) { method GetLabel (line 72) | std::vector GetLabel() { return ExtractVector(output_l... method GetWeight (line 73) | std::vector GetWeight() { method writeFloat32 (line 77) | void writeFloat32(float value, std::vector* data) { method writeInt32 (line 88) | void writeInt32(int32_t value, std::vector* data) { function TEST (line 108) | TEST(PredictOpTest, AllLabelsAreValid) { function TEST (line 119) | TEST(PredictOpTest, MoreLabelsThanRequired) { function TEST (line 130) | TEST(PredictOpTest, OneLabelDoesNotPassThreshold) { function TEST (line 141) | TEST(PredictOpTest, NoneLabelPassThreshold) { function TEST (line 152) | TEST(PredictOpTest, OnlyOneLabelGenerated) { function TEST (line 163) | TEST(PredictOpTest, NoLabelGenerated) { function main (line 179) | int main(int argc, char** argv) { FILE: lite/examples/smart_reply/android/app/libs/cc/predictor.cc type tflite (line 28) | namespace tflite { type custom (line 29) | namespace custom { type smartreply (line 30) | namespace smartreply { function SplitSentence (line 33) | std::vector SplitSentence(const std::string& input) { function ExecuteTfLite (line 45) | void ExecuteTfLite(const std::string& sentence, function GetSegmentPredictions (line 70) | void GetSegmentPredictions( FILE: lite/examples/smart_reply/android/app/libs/cc/predictor.h function namespace (line 25) | namespace custom { FILE: lite/examples/smart_reply/android/app/libs/cc/predictor_test.cc type tflite (line 29) | namespace tflite { type custom (line 30) | namespace custom { type smartreply (line 31) | namespace smartreply { function string (line 38) | string GetModelFilePath() { function string (line 42) | string GetSamplesFilePath() { class PredictorTest (line 58) | class PredictorTest : public ::testing::Test { method PredictorTest (line 60) | PredictorTest() {} method SetUp (line 63) | void SetUp() override { function TEST_F (line 71) | TEST_F(PredictorTest, GetSegmentPredictions) { function TEST_F (line 90) | TEST_F(PredictorTest, TestTwoSentences) { function TEST_F (line 109) | TEST_F(PredictorTest, TestBackoff) { function TEST_F (line 123) | TEST_F(PredictorTest, BatchTest) { function main (line 160) | int main(int argc, char **argv) { FILE: lite/examples/smart_reply/android/app/libs/cc/smartreply_jni.cc function T (line 30) | T CheckNotNull(JNIEnv* env, T&& t) { function jniStringArrayToVector (line 38) | std::vector jniStringArrayToVector(JNIEnv* env, type JNIStorage (line 52) | struct JNIStorage { function JNIEXPORT (line 57) | JNIEXPORT jlong JNICALL function JNIEXPORT (line 78) | JNIEXPORT jobjectArray JNICALL function JNIEXPORT (line 122) | JNIEXPORT void JNICALL FILE: lite/examples/smart_reply/android/app/src/main/java/org/tensorflow/lite/examples/smartreply/AssetsUtil.java class AssetsUtil (line 31) | public class AssetsUtil { method AssetsUtil (line 33) | private AssetsUtil() {} method getAssetFileDescriptorOrCached (line 39) | public static AssetFileDescriptor getAssetFileDescriptorOrCached( method copyToCacheFile (line 54) | private static void copyToCacheFile(Context context, String assetPath,... FILE: lite/examples/smart_reply/android/app/src/main/java/org/tensorflow/lite/examples/smartreply/MainActivity.java class MainActivity (line 33) | public class MainActivity extends AppCompatActivity { method onCreate (line 43) | @Override method onStart (line 70) | @Override method onStop (line 80) | @Override method send (line 90) | private void send(final String message) { FILE: lite/examples/smart_reply/android/app/src/main/java/org/tensorflow/lite/examples/smartreply/SmartReply.java class SmartReply (line 25) | @Keep method SmartReply (line 31) | @Keep method getText (line 37) | public String getText() { method getScore (line 41) | public float getScore() { FILE: lite/examples/smart_reply/android/app/src/main/java/org/tensorflow/lite/examples/smartreply/SmartReplyClient.java class SmartReplyClient (line 33) | public class SmartReplyClient implements AutoCloseable { method SmartReplyClient (line 45) | public SmartReplyClient(Context context) { method isLoaded (line 49) | public boolean isLoaded() { method loadModel (line 53) | @WorkerThread method predict (line 70) | @WorkerThread method unloadModel (line 79) | @WorkerThread method close (line 84) | @Override method loadModelFile (line 92) | private MappedByteBuffer loadModelFile() throws IOException { method loadBackoffList (line 103) | private String[] loadBackoffList() throws IOException { method loadJNI (line 119) | @Keep method predictJNI (line 122) | @Keep method unloadJNI (line 125) | @Keep FILE: lite/examples/sound_classification/raspberry_pi/classify.py function run (line 25) | def run(model: str, max_results: int, score_threshold: float, function main (line 92) | def main(): FILE: lite/examples/sound_classification/raspberry_pi/utils.py class Plotter (line 29) | class Plotter(object): method __init__ (line 35) | def __init__(self) -> None: method plot (line 50) | def plot(self, result) -> None: FILE: lite/examples/speech_commands/ml/callbacks.py function log_loss (line 25) | def log_loss(y_true, y_pred, eps=1e-12): class ConfusionMatrixCallback (line 32) | class ConfusionMatrixCallback(Callback): method __init__ (line 34) | def __init__(self, validation_data, validation_steps, wanted_words, al... method accuracies (line 47) | def accuracies(self, confusion_val): method accuracy (line 58) | def accuracy(self, confusion_val): method on_epoch_end (line 65) | def on_epoch_end(self, epoch, logs=None): FILE: lite/examples/speech_commands/ml/classes.py function get_classes (line 24) | def get_classes(wanted_only=False): function get_int2label (line 38) | def get_int2label(wanted_only=False, extend_reversed=False): function get_label2int (line 47) | def get_label2int(wanted_only=False, extend_reversed=False): FILE: lite/examples/speech_commands/ml/generator.py function prepare_words_list (line 42) | def prepare_words_list(wanted_words): function which_set (line 47) | def which_set(filename, validation_percentage, testing_percentage): function load_wav_file (line 68) | def load_wav_file(filename): function save_wav_file (line 80) | def save_wav_file(filename, wav_data, sample_rate): class AudioProcessor (line 98) | class AudioProcessor(object): method __init__ (line 101) | def __init__(self, method maybe_download_and_extract_dataset (line 122) | def maybe_download_and_extract_dataset(self, data_dir): method prepare_data_index (line 127) | def prepare_data_index(self, silence_percentage, unknown_percentage, method prepare_background_data (line 193) | def prepare_background_data(self): method prepare_processing_graph (line 214) | def prepare_processing_graph(self, model_settings): method set_size (line 266) | def set_size(self, mode): method get_data (line 270) | def get_data(self, method get_unprocessed_data (line 392) | def get_unprocessed_data(self, how_many, model_settings, mode): method summary (line 428) | def summary(self): FILE: lite/examples/speech_commands/ml/model.py function preprocess (line 26) | def preprocess(x): function preprocess_raw (line 32) | def preprocess_raw(x): function relu6 (line 41) | def relu6(x): function conv_1d_time_stacked_model (line 45) | def conv_1d_time_stacked_model(input_size=16000, num_classes=11): function speech_model (line 114) | def speech_model(model_type, input_size, num_classes=11, *args, **kwargs): function prepare_model_settings (line 121) | def prepare_model_settings(label_count, FILE: lite/examples/speech_commands/ml/utils.py function data_gen (line 23) | def data_gen(audio_processor, function tf_roll (line 68) | def tf_roll(a, shift, a_len=16000): FILE: lite/examples/super_resolution/android/app/src/main/cc/SuperResolution.cpp type tflite (line 28) | namespace tflite { type examples (line 29) | namespace examples { type superresolution (line 30) | namespace superresolution { FILE: lite/examples/super_resolution/android/app/src/main/cc/SuperResolution.h function namespace (line 31) | namespace tflite { FILE: lite/examples/super_resolution/android/app/src/main/cc/SuperResolution_jni.cpp type tflite (line 26) | namespace tflite { type examples (line 27) | namespace examples { type superresolution (line 28) | namespace superresolution { function JNIEXPORT (line 30) | JNIEXPORT jintArray JNICALL function JNIEXPORT (line 56) | JNIEXPORT jlong JNICALL function JNIEXPORT (line 73) | JNIEXPORT void JNICALL FILE: lite/examples/super_resolution/android/app/src/main/java/org/tensorflow/lite/examples/superresolution/AssetsUtil.java class AssetsUtil (line 31) | public class AssetsUtil { method AssetsUtil (line 33) | private AssetsUtil() {} method getAssetFileDescriptorOrCached (line 39) | public static AssetFileDescriptor getAssetFileDescriptorOrCached( method copyToCacheFile (line 54) | private static void copyToCacheFile(Context context, String assetPath,... FILE: lite/examples/super_resolution/android/app/src/main/java/org/tensorflow/lite/examples/superresolution/MainActivity.java class MainActivity (line 44) | public class MainActivity extends AppCompatActivity { method onCreate (line 71) | @Override method onDestroy (line 165) | @Override method setLRImageViewListener (line 171) | private void setLRImageViewListener(ImageView iv) { method doSuperResolution (line 200) | @WorkerThread method loadModelFile (line 205) | private MappedByteBuffer loadModelFile() throws IOException { method showToast (line 216) | private void showToast(String str) { method initTFLiteInterpreter (line 220) | private long initTFLiteInterpreter(boolean useGPU) { method deinit (line 229) | private void deinit() { method superResolutionFromJNI (line 233) | private native int[] superResolutionFromJNI(long superResolutionNative... method initWithByteBufferFromJNI (line 235) | private native long initWithByteBufferFromJNI(MappedByteBuffer modelBu... method deinitFromJNI (line 237) | private native void deinitFromJNI(long superResolutionNativeHandle); FILE: lite/examples/video_classification/raspberry_pi/classify.py function run (line 35) | def run(model: str, label: str, max_results: int, num_threads: int, function main (line 130) | def main(): FILE: lite/examples/video_classification/raspberry_pi/video_classifier.py class VideoClassifierOptions (line 32) | class VideoClassifierOptions(NamedTuple): class Category (line 51) | class Category(NamedTuple): class VideoClassifier (line 57) | class VideoClassifier(object): method __init__ (line 65) | def __init__( method clear (line 107) | def clear(self): method _preprocess (line 121) | def _preprocess(self, image: np.ndarray) -> np.ndarray: method classify (line 130) | def classify(self, frame: np.ndarray) -> List[Category]: method _postprocess (line 154) | def _postprocess(self, logits: np.ndarray) -> List[Category]: FILE: lite/examples/video_classification/raspberry_pi/video_classifier_test.py class VideoClassifierTest (line 37) | class VideoClassifierTest(unittest.TestCase): method setUp (line 39) | def setUp(self): method _run_classification_with_frames (line 52) | def _run_classification_with_frames(self, classifier: VideoClassifier, method test_default_option (line 61) | def test_default_option(self): method test_allow_list (line 79) | def test_allow_list(self): method test_deny_list (line 93) | def test_deny_list(self): method test_score_threshold_option (line 106) | def test_score_threshold_option(self): method test_max_results_option (line 121) | def test_max_results_option(self): FILE: lite/tools/build_model_maker_api_docs.py class OrderedDumper (line 40) | class OrderedDumper(yaml.dumper.Dumper): function _dict_representer (line 44) | def _dict_representer(dumper, data): class DeprecatedAPIFilter (line 68) | class DeprecatedAPIFilter(object): method __init__ (line 71) | def __init__(self): method _is_deprecated (line 79) | def _is_deprecated(self, path: Sequence[str], child_name: str) -> bool: method __call__ (line 88) | def __call__(self, path: Sequence[str], parent: Any, function main (line 95) | def main(_): FILE: tensorflow_examples/lite/model_maker/cli/cli.py class FormatDoc (line 32) | class FormatDoc(object): method __init__ (line 35) | def __init__(self, *format_args, **format_kwargs): method __call__ (line 39) | def __call__(self, fn): class ModelMakerCLI (line 44) | class ModelMakerCLI(object): method __init__ (line 51) | def __init__(self, tf=2): method image_classification (line 55) | def image_classification(self, method text_classification (line 75) | def text_classification(self, method question_answer (line 94) | def question_answer(self, function main (line 116) | def main(): FILE: tensorflow_examples/lite/model_maker/cli/cli_test.py function patch_image (line 35) | def patch_image(): function patch_text (line 40) | def patch_text(): function patch_qa (line 45) | def patch_qa(): function patch_setup (line 50) | def patch_setup(): class CLITest (line 55) | class CLITest(parameterized.TestCase): method test_init (line 62) | def test_init(self, tf_opt, expected_tf): method test_image_classification_demo (line 74) | def test_image_classification_demo(self, opt, args, kwargs): method test_image_classification_demo_lack_param (line 80) | def test_image_classification_demo_lack_param(self): method test_text_classification_demo (line 92) | def test_text_classification_demo(self, opt, args, kwargs): method test_text_classification_demo_lack_param (line 98) | def test_text_classification_demo_lack_param(self): method test_question_answer_demo (line 110) | def test_question_answer_demo(self, opt, args, kwargs): method test_question_answer_lack_param (line 119) | def test_question_answer_lack_param(self): method test_invalid_command (line 126) | def test_invalid_command(self): method test_help (line 137) | def test_help(self, opt): FILE: tensorflow_examples/lite/model_maker/core/api/api_gen.py function parse_arguments (line 31) | def parse_arguments(): function _read_golden_text (line 51) | def _read_golden_text(json_file: str) -> str: function load_golden (line 58) | def load_golden(json_file: str) -> Dict[str, Sequence[str]]: function run (line 64) | def run(output_dir: str, base_package: str, version: str) -> None: function main (line 78) | def main() -> None: FILE: tensorflow_examples/lite/model_maker/core/api/api_gen_test.py class ApiGenTest (line 26) | class ApiGenTest(tf.test.TestCase): method test_golden_api (line 28) | def test_golden_api(self): method test_golden_api_doc (line 39) | def test_golden_api_doc(self): FILE: tensorflow_examples/lite/model_maker/core/api/api_util.py class Symbol (line 75) | class Symbol: method from_callable (line 85) | def from_callable(cls, exported_name: str, func: Callable) -> 'Symbol': method from_constant (line 100) | def from_constant(cls, exported_name: str, module: str, method get_package_name (line 111) | def get_package_name(self) -> str: method gen_import (line 115) | def gen_import(self) -> str: method gen_parents_import (line 127) | def gen_parents_import(self) -> Dict[str, Sequence[str]]: function split_name (line 142) | def split_name(name: str) -> List[str]: function as_package (line 155) | def as_package(names: List[str]) -> str: function as_path (line 160) | def as_path(names: List[str]) -> str: function _get_module_and_name (line 168) | def _get_module_and_name(func: Callable) -> Tuple[str, str]: class mm_export (line 175) | class mm_export: # pylint: disable=invalid-name method __init__ (line 178) | def __init__(self, name: str): method __call__ (line 183) | def __call__(self, func: Callable) -> Callable: method export_constant (line 189) | def export_constant(self, module: str, name: str) -> None: function _reset_apis (line 195) | def _reset_apis(): function _case_insensitive (line 201) | def _case_insensitive(s: str): function generate_imports (line 206) | def generate_imports() -> Dict[str, Sequence[str]]: function generate_package_doc (line 227) | def generate_package_doc(package_name): function write_packages (line 232) | def write_packages( function make_dirs_or_not (line 288) | def make_dirs_or_not(dirpath: Union[PathOrStrType]): function write_python_file (line 294) | def write_python_file(filepath: PathOrStrType, package_doc: Optional[str], function _version_line (line 306) | def _version_line(version: str): function overwrite_version_in_package (line 311) | def overwrite_version_in_package(base_dir: PathOrStrType, version: str): FILE: tensorflow_examples/lite/model_maker/core/api/api_util_test.py class MMExportTest (line 24) | class MMExportTest(tf.test.TestCase): method setUp (line 26) | def setUp(self): method test_call (line 30) | def test_call(self): method test_call_class (line 40) | def test_call_class(self): method test_call_duplicated (line 50) | def test_call_duplicated(self): method test_call_global_function (line 61) | def test_call_global_function(self): method test_export_constant (line 80) | def test_export_constant(self): class ApiUtilTest (line 91) | class ApiUtilTest(tf.test.TestCase): method setUp (line 93) | def setUp(self): method test_get_module_and_name (line 97) | def test_get_module_and_name(self): method test_generate_imports (line 118) | def test_generate_imports(self): method test_write_packages (line 154) | def test_write_packages(self): FILE: tensorflow_examples/lite/model_maker/core/compat.py function setup_tf_behavior (line 28) | def setup_tf_behavior(tf_version=_DEFAULT_TF_BEHAVIOR): function get_tf_behavior (line 45) | def get_tf_behavior(): function get_compat_tf_versions (line 54) | def get_compat_tf_versions(compat_tf_versions=None): FILE: tensorflow_examples/lite/model_maker/core/data_util/audio_dataloader.py class ExamplesHelper (line 38) | class ExamplesHelper(object): method from_examples_folder (line 42) | def from_examples_folder(cls, path, examples_filter_fn): method __init__ (line 91) | def __init__(self, examples_in_absolute_path, labels): method _get_index_to_label (line 97) | def _get_index_to_label(self, used_labels): method _get_label_to_index (line 100) | def _get_label_to_index(self, index_to_label): method shuffle (line 103) | def shuffle(self): method filter (line 106) | def filter(self, labels): method examples_and_label_indices (line 111) | def examples_and_label_indices(self): method examples_and_labels (line 117) | def examples_and_labels(self): method examples_and_label_indices_ds (line 124) | def examples_and_label_indices_ds(self): class DataLoader (line 133) | class DataLoader(dataloader.ClassificationDataLoader): method __init__ (line 136) | def __init__(self, dataset, size, index_to_label, spec, cache=False): method __len__ (line 141) | def __len__(self): method from_folder (line 151) | def from_folder(cls, method from_esc50 (line 206) | def from_esc50(cls, method split (line 262) | def split(self, fraction): method gen_dataset (line 265) | def gen_dataset(self, FILE: tensorflow_examples/lite/model_maker/core/data_util/audio_dataloader_test.py function write_file (line 32) | def write_file(root, filepath): function write_sample (line 39) | def write_sample(root, function write_csv (line 51) | def write_csv(root, folder, filename, headers, rows): class MockSpec (line 61) | class MockSpec(audio_spec.BaseSpec): method __init__ (line 63) | def __init__(self, *args, **kwargs): method create_model (line 67) | def create_model(self): method run_classifier (line 70) | def run_classifier(self, *args, **kwargs): method target_sample_rate (line 74) | def target_sample_rate(self): method preprocess_ds (line 77) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): class Base (line 105) | class Base(tf.test.TestCase): method _get_folder_path (line 107) | def _get_folder_path(self, sub_folder_name): class LoadFromESC50Test (line 119) | class LoadFromESC50Test(Base): method test_from_esc50 (line 121) | def test_from_esc50(self): class ExamplesHelperTest (line 184) | class ExamplesHelperTest(Base): method test_examples_helper (line 186) | def test_examples_helper(self): class LoadFromFolderTest (line 218) | class LoadFromFolderTest(Base): method test_spec (line 220) | def test_spec(self): method test_no_audio_files_found (line 230) | def test_no_audio_files_found(self): method test_failed_librosa_imoprt (line 237) | def test_failed_librosa_imoprt(self): method test_from_folder (line 272) | def test_from_folder(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/data_util.py function generate_elements (line 24) | def generate_elements(ds): FILE: tensorflow_examples/lite/model_maker/core/data_util/dataloader.py function shard (line 26) | def shard(ds, input_pipeline_context): class DataLoader (line 36) | class DataLoader(object): method __init__ (line 44) | def __init__(self, dataset, size=None): method size (line 63) | def size(self) -> Optional[int]: method gen_dataset (line 76) | def gen_dataset(self, method __len__ (line 126) | def __len__(self): method split (line 132) | def split(self, fraction): method _split (line 146) | def _split(self, fraction, *args): class ClassificationDataLoader (line 174) | class ClassificationDataLoader(DataLoader): method __init__ (line 177) | def __init__(self, dataset, size, index_to_label): method num_classes (line 182) | def num_classes(self): method split (line 185) | def split(self, fraction): FILE: tensorflow_examples/lite/model_maker/core/data_util/dataloader_test.py class DataLoaderTest (line 25) | class DataLoaderTest(tf.test.TestCase): method test_split (line 27) | def test_split(self): method test_len (line 42) | def test_len(self): method test_gen_dataset (line 48) | def test_gen_dataset(self): class ClassificationDataLoaderTest (line 72) | class ClassificationDataLoaderTest(tf.test.TestCase): method test_split (line 74) | def test_split(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/image_dataloader.py function load_image (line 29) | def load_image(path): function create_data (line 39) | def create_data(name, data, info, label_names): class ImageClassifierDataLoader (line 50) | class ImageClassifierDataLoader(dataloader.ClassificationDataLoader): method from_folder (line 54) | def from_folder(cls, filename, shuffle=True): method from_tfds (line 109) | def from_tfds(cls, name): FILE: tensorflow_examples/lite/model_maker/core/data_util/image_dataloader_test.py function _fill_image (line 27) | def _fill_image(rgb, image_size): function _write_filled_jpeg_file (line 34) | def _write_filled_jpeg_file(path, rgb, image_size): class ImageDataLoaderTest (line 39) | class ImageDataLoaderTest(tf.test.TestCase): method setUp (line 41) | def setUp(self): method test_split (line 54) | def test_split(self): method test_from_folder (line 71) | def test_from_folder(self): method test_from_tfds (line 88) | def test_from_tfds(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/image_searcher_dataloader.py class DataLoader (line 34) | class DataLoader(searcher_dataloader.DataLoader): method __init__ (line 37) | def __init__( method create (line 61) | def create(cls, method load_from_folder (line 94) | def load_from_folder(self, path: str, mode: str = "r") -> None: FILE: tensorflow_examples/lite/model_maker/core/data_util/metadata_loader.py class MetadataType (line 26) | class MetadataType(enum.Enum): class MetadataLoader (line 31) | class MetadataLoader(object): method __init__ (line 34) | def __init__(self, func: Callable[..., AnyStr]) -> None: method load (line 37) | def load(self, path: str, **kwargs) -> AnyStr: method from_file_name (line 42) | def from_file_name(cls) -> "MetadataLoader": method from_dat_file (line 51) | def from_dat_file(cls) -> "MetadataLoader": FILE: tensorflow_examples/lite/model_maker/core/data_util/metadata_loader_test.py class MetadataLoaderTest (line 21) | class MetadataLoaderTest(tf.test.TestCase): method test_from_file_name (line 23) | def test_from_file_name(self): method test_from_dat_file (line 28) | def test_from_dat_file(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/object_detector_dataloader.py function _get_label_map (line 37) | def _get_label_map(label_map): function _group_csv_lines (line 63) | def _group_csv_lines(csv_file: str, class DataLoader (line 103) | class DataLoader(dataloader.DataLoader): method __init__ (line 106) | def __init__(self, method from_pascal_voc (line 138) | def from_pascal_voc( method from_csv (line 225) | def from_csv( method from_cache (line 308) | def from_cache(cls, cache_prefix): method gen_dataset (line 338) | def gen_dataset(self, method split (line 364) | def split(self, fraction): FILE: tensorflow_examples/lite/model_maker/core/data_util/object_detector_dataloader_test.py class MockDetectorModelSpec (line 32) | class MockDetectorModelSpec(object): method __init__ (line 34) | def __init__(self, model_name): class ObjectDectectorDataLoaderTest (line 42) | class ObjectDectectorDataLoaderTest(tf.test.TestCase): method test_from_pascal_voc (line 44) | def test_from_pascal_voc(self): method test_from_csv (line 79) | def test_from_csv(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/object_detector_dataloader_util.py function _get_cache_dir_or_create (line 43) | def _get_cache_dir_or_create(cache_dir: Optional[str]) -> str: function _get_dir_basename (line 55) | def _get_dir_basename(dirname): function get_cache_prefix_filename_from_pascal (line 60) | def get_cache_prefix_filename_from_pascal(images_dir: str, function get_cache_prefix_filename_from_csv (line 88) | def get_cache_prefix_filename_from_csv(csv_file: str, num_shards: int) -... class CacheFiles (line 105) | class CacheFiles: function get_cache_files (line 113) | def get_cache_files(cache_dir: Optional[str], function is_cached (line 151) | def is_cached(cache_files: CacheFiles) -> bool: function is_all_cached (line 159) | def is_all_cached(cache_files_collection: Collection[CacheFiles]) -> bool: function get_cache_files_sequence (line 164) | def get_cache_files_sequence(cache_dir: str, cache_prefix_filename: str, class CacheFilesWriter (line 189) | class CacheFilesWriter(abc.ABC): method __init__ (line 192) | def __init__(self, method write_files (line 225) | def write_files(self, cache_files: CacheFiles, *args, **kwargs) -> None: method _get_xml_dict (line 275) | def _get_xml_dict(self, *args, **kwargs) -> tf.train.Example: class PascalVocCacheFilesWriter (line 280) | class PascalVocCacheFilesWriter(CacheFilesWriter): method _get_xml_dict (line 283) | def _get_xml_dict( function _get_xml_dict_from_csv_lines (line 316) | def _get_xml_dict_from_csv_lines(images_dir: str, image_filename: str, class CsvCacheFilesWriter (line 357) | class CsvCacheFilesWriter(CacheFilesWriter): method _get_xml_dict (line 360) | def _get_xml_dict(self, csv_lines: List[List[str]]) -> tf.train.Example: FILE: tensorflow_examples/lite/model_maker/core/data_util/object_detector_dataloader_util_test.py class CacheFilesTest (line 25) | class CacheFilesTest(tf.test.TestCase): method test_get_cache_files (line 27) | def test_get_cache_files(self): method test_filename_from_pascal (line 38) | def test_filename_from_pascal(self): method test_filename_from_csv (line 82) | def test_filename_from_csv(self): class CacheFilesWriterTest (line 100) | class CacheFilesWriterTest(tf.test.TestCase): method test_pascal_voc_cache_writer (line 102) | def test_pascal_voc_cache_writer(self): method test_csv_cache_writer (line 158) | def test_csv_cache_writer(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/recommendation_dataloader.py class RecommendationDataLoader (line 33) | class RecommendationDataLoader(dataloader.DataLoader): method __init__ (line 36) | def __init__(self, dataset, size, vocab): method gen_dataset (line 62) | def gen_dataset(self, method split (line 87) | def split(self, fraction): method load_vocab (line 91) | def load_vocab(cls, vocab_file) -> collections.OrderedDict: method _read_dataset (line 125) | def _read_dataset(cls, data_filepattern: str, method download_and_extract_movielens (line 142) | def download_and_extract_movielens(cls, download_dir): method generate_movielens_dataset (line 147) | def generate_movielens_dataset( method get_num_classes (line 211) | def get_num_classes(cls, meta) -> int: method from_movielens (line 226) | def from_movielens(cls, FILE: tensorflow_examples/lite/model_maker/core/data_util/recommendation_dataloader_test.py class RecommendationDataLoaderTest (line 23) | class RecommendationDataLoaderTest(tf.test.TestCase): method setUp (line 25) | def setUp(self): method test_download_and_extract_data (line 30) | def test_download_and_extract_data(self): method test_generate_movielens_dataset (line 37) | def test_generate_movielens_dataset(self): method test_from_movielens (line 61) | def test_from_movielens(self): method test_split (line 79) | def test_split(self): method test_gen_dataset (line 91) | def test_gen_dataset(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/recommendation_testutil.py function _generate_fake_data (line 35) | def _generate_fake_data(data_dir): function _write_file_by_lines (line 79) | def _write_file_by_lines(data, filename): function setup_fake_testdata (line 87) | def setup_fake_testdata(obj): function patch_download_and_extract_data (line 105) | def patch_download_and_extract_data(data_dir): function get_input_spec (line 130) | def get_input_spec(encoder_type='cnn') -> recommendation_config.InputSpec: function get_model_hparams (line 174) | def get_model_hparams() -> recommendation_config.ModelHParams: FILE: tensorflow_examples/lite/model_maker/core/data_util/searcher_dataloader.py class DataLoader (line 23) | class DataLoader(object): method __init__ (line 26) | def __init__( method __len__ (line 60) | def __len__(self): method dataset (line 64) | def dataset(self) -> np.ndarray: method metadata (line 83) | def metadata(self) -> List[AnyStr]: method embedder_path (line 88) | def embedder_path(self) -> Optional[str]: method append (line 92) | def append(self, data_loader: "DataLoader") -> None: FILE: tensorflow_examples/lite/model_maker/core/data_util/searcher_dataloader_test.py class SearcherDataloaderTest (line 29) | class SearcherDataloaderTest(tf.test.TestCase): method setUp (line 31) | def setUp(self): method test_concat_dataset (line 36) | def test_concat_dataset(self): method test_append (line 50) | def test_append(self): method test_init (line 68) | def test_init(self): FILE: tensorflow_examples/lite/model_maker/core/data_util/text_dataloader.py function _load (line 38) | def _load(tfrecord_file, meta_data_file, model_spec, is_training=None): function _get_cache_filenames (line 58) | def _get_cache_filenames(cache_dir, model_spec, data_name, is_training): function _get_cache_info (line 71) | def _get_cache_info(cache_dir, data_name, model_spec, is_training): class TextClassifierDataLoader (line 84) | class TextClassifierDataLoader(dataloader.ClassificationDataLoader): method from_folder (line 88) | def from_folder(cls, method from_csv (line 166) | def from_csv(cls, method _load_data (line 239) | def _load_data(cls, tfrecord_file, meta_data_file, model_spec): method _save_data (line 247) | def _save_data(cls, examples, model_spec, label_names, tfrecord_file, method _get_cache_info (line 268) | def _get_cache_info(cls, cache_dir, data_name, model_spec, is_training): method _read_csv (line 281) | def _read_csv(cls, input_file, fieldnames=None, delimiter=',', quotech... class QuestionAnswerDataLoader (line 293) | class QuestionAnswerDataLoader(dataloader.DataLoader): method __init__ (line 296) | def __init__(self, dataset, size, version_2_with_negative, examples, f... method from_squad (line 305) | def from_squad(cls, method _generate_tf_record_from_squad_file (line 353) | def _generate_tf_record_from_squad_file(cls, FILE: tensorflow_examples/lite/model_maker/core/data_util/text_dataloader_test.py class MockClassifierModelSpec (line 34) | class MockClassifierModelSpec(object): method __init__ (line 37) | def __init__(self, seq_len=4, index_to_label=None): method get_name_to_features (line 41) | def get_name_to_features(self): method select_data_from_record (line 49) | def select_data_from_record(self, record): method convert_examples_to_features (line 55) | def convert_examples_to_features(self, examples, tfrecord_file, label_... method get_config (line 75) | def get_config(self): class MockQAModelSpec (line 79) | class MockQAModelSpec(object): method __init__ (line 81) | def __init__(self, vocab_dir): method get_name_to_features (line 93) | def get_name_to_features(self, is_training): method select_data_from_record (line 109) | def select_data_from_record(self, record): method get_config (line 123) | def get_config(self): method convert_examples_to_features (line 132) | def convert_examples_to_features(self, examples, is_training, output_fn, class LoaderFunctionTest (line 146) | class LoaderFunctionTest(tf.test.TestCase): method setUp (line 148) | def setUp(self): method test_load (line 152) | def test_load(self): method test_get_cache_filenames (line 165) | def test_get_cache_filenames(self): method _get_tfrecord_file (line 202) | def _get_tfrecord_file(self): method _get_meta_data_file (line 215) | def _get_meta_data_file(self): class TextClassifierDataLoaderTest (line 223) | class TextClassifierDataLoaderTest(tf.test.TestCase): method _get_folder_path (line 228) | def _get_folder_path(self): method _get_csv_file (line 241) | def _get_csv_file(self, is_training): method test_split (line 258) | def test_split(self): method test_from_csv (line 275) | def test_from_csv(self): method test_from_folder (line 307) | def test_from_folder(self): method _test_data (line 315) | def _test_data(self, data, model_spec, size, num_classes, index_to_lab... class QuestionAnswerDataLoaderTest (line 325) | class QuestionAnswerDataLoaderTest(tf.test.TestCase, parameterized.TestC... method test_from_squad (line 333) | def test_from_squad(self, test_file, is_training, version_2_with_negat... FILE: tensorflow_examples/lite/model_maker/core/data_util/text_searcher_dataloader.py class DataLoader (line 31) | class DataLoader(searcher_dataloader.DataLoader): method __init__ (line 34) | def __init__(self, embedder: text_embedder.TextEmbedder) -> None: method create (line 44) | def create(cls, method load_from_csv (line 71) | def load_from_csv(self, FILE: tensorflow_examples/lite/model_maker/core/data_util/text_searcher_dataloader_test.py class TextSearcherDataloaderTest (line 23) | class TextSearcherDataloaderTest(parameterized.TestCase, tf.test.TestCase): method setUp (line 25) | def setUp(self): method test_from_csv (line 36) | def test_from_csv(self, l2_normalize, expected_value): FILE: tensorflow_examples/lite/model_maker/core/export_format.py class ExportFormat (line 26) | class ExportFormat(enum.Enum): FILE: tensorflow_examples/lite/model_maker/core/file_util.py function load_json_file (line 25) | def load_json_file(json_file): function write_json_file (line 31) | def write_json_file(json_file, data): FILE: tensorflow_examples/lite/model_maker/core/optimization/warmup.py class WarmUp (line 23) | class WarmUp(tf.keras.optimizers.schedules.LearningRateSchedule): method __init__ (line 26) | def __init__(self, method __call__ (line 37) | def __call__(self, step): method get_config (line 51) | def get_config(self): FILE: tensorflow_examples/lite/model_maker/core/task/audio_classifier.py class AudioClassifier (line 28) | class AudioClassifier(classification_model.ClassificationModel): method train (line 36) | def train(self, train_data, validation_data, epochs, batch_size): method create_model (line 59) | def create_model(self, num_classes, train_whole_model): method _export_tflite (line 64) | def _export_tflite(self, method confusion_matrix (line 86) | def confusion_matrix(self, data, batch_size=32): method create (line 104) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/audio_classifier_test.py class BrowserFFTWithoutPreprocessing (line 34) | class BrowserFFTWithoutPreprocessing(audio_spec.BrowserFFTSpec): method preprocess_ds (line 36) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): class YAMNetWithoutPreprcessing (line 51) | class YAMNetWithoutPreprcessing(audio_spec.YAMNetSpec): method preprocess_ds (line 53) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): function write_sample (line 64) | def write_sample(root, class AudioClassifierTest (line 81) | class AudioClassifierTest(tf.test.TestCase): method testBrowserFFT (line 83) | def testBrowserFFT(self): method testYAMNet (line 87) | def testYAMNet(self): method testConfusionMatrix (line 90) | def testConfusionMatrix(self): method _test_spec (line 120) | def _test_spec(self, train_spec, tflite_eval_spec): FILE: tensorflow_examples/lite/model_maker/core/task/classification_model.py class ClassificationModel (line 30) | class ClassificationModel(custom_model.CustomModel): method __init__ (line 37) | def __init__(self, model_spec, index_to_label, shuffle, train_whole_mo... method evaluate (line 53) | def evaluate(self, data, batch_size=32): method predict_top_k (line 67) | def predict_top_k(self, data, k=1, batch_size=32): method _export_labels (line 97) | def _export_labels(self, label_filepath): method evaluate_tflite (line 105) | def evaluate_tflite(self, tflite_filepath, data, postprocess_fn=None): FILE: tensorflow_examples/lite/model_maker/core/task/classification_model_test.py class MockClassificationModel (line 26) | class MockClassificationModel(classification_model.ClassificationModel): method train (line 28) | def train(self, train_data, validation_data=None, **kwargs): method export (line 31) | def export(self, **kwargs): method evaluate (line 34) | def evaluate(self, data, **kwargs): class ClassificationModelTest (line 38) | class ClassificationModelTest(tf.test.TestCase): method setUp (line 40) | def setUp(self): method test_predict_top_k (line 49) | def test_predict_top_k(self): method test_export_labels (line 73) | def test_export_labels(self): FILE: tensorflow_examples/lite/model_maker/core/task/configs.py function _get_representative_dataset_gen (line 29) | def _get_representative_dataset_gen(dataset, num_steps): class QuantizationConfig (line 54) | class QuantizationConfig(object): method __init__ (line 62) | def __init__( method for_dynamic (line 122) | def for_dynamic(cls): method for_int8 (line 127) | def for_int8(cls, method for_float16 (line 158) | def for_float16(cls): method get_converter_with_quantization (line 162) | def get_converter_with_quantization(self, converter, **kwargs): FILE: tensorflow_examples/lite/model_maker/core/task/custom_model.py function _get_params (line 30) | def _get_params(f, **kwargs): class CustomModel (line 40) | class CustomModel(abc.ABC): method __init__ (line 47) | def __init__(self, model_spec, shuffle): method train (line 62) | def train(self, train_data, validation_data=None, **kwargs): method summary (line 65) | def summary(self): method evaluate (line 69) | def evaluate(self, data, **kwargs): method _get_default_export_format (line 72) | def _get_default_export_format(self, **kwargs): method _get_export_format (line 80) | def _get_export_format(self, export_format, **kwargs): method export (line 95) | def export(self, method create_serving_model (line 170) | def create_serving_model(self): method _export_saved_model (line 178) | def _export_saved_model(self, method _export_tflite (line 205) | def _export_tflite(self, tflite_filepath, quantization_config=None): method _export_tfjs (line 214) | def _export_tfjs(self, tfjs_filepath, tflite_filepath=None, **kwargs): method _keras_callbacks (line 225) | def _keras_callbacks(self, model_dir): FILE: tensorflow_examples/lite/model_maker/core/task/custom_model_test.py class MockCustomModel (line 28) | class MockCustomModel(custom_model.CustomModel): method _export_labels (line 34) | def _export_labels(self, label_filepath): method train (line 38) | def train(self, train_data, validation_data=None, **kwargs): method evaluate (line 41) | def evaluate(self, data, **kwargs): class CustomModelTest (line 45) | class CustomModelTest(tf.test.TestCase): method setUp (line 47) | def setUp(self): method _check_nonempty_dir (line 54) | def _check_nonempty_dir(self, dirpath): method _check_nonempty_file (line 58) | def _check_nonempty_file(self, filepath): method test_export_saved_model (line 62) | def test_export_saved_model(self): method test_export (line 67) | def test_export(self): FILE: tensorflow_examples/lite/model_maker/core/task/hub_loader.py class HubKerasLayerV1V2 (line 23) | class HubKerasLayerV1V2(hub.KerasLayer): method _setup_layer (line 35) | def _setup_layer(self, trainable=False, **kwargs): method _check_trainability (line 42) | def _check_trainability(self): method _setup_layer_v1 (line 49) | def _setup_layer_v1(self, trainable=False, **kwargs): method _check_trainability_v1 (line 94) | def _check_trainability_v1(self): FILE: tensorflow_examples/lite/model_maker/core/task/hub_loader_test.py class HubKerasLayerV1V2Test (line 26) | class HubKerasLayerV1V2Test(tf.test.TestCase, parameterized.TestCase): method test_load_with_defaults (line 34) | def test_load_with_defaults(self, module_name, trainable): method test_trainable_varaible (line 41) | def test_trainable_varaible(self): FILE: tensorflow_examples/lite/model_maker/core/task/image_classifier.py function get_hub_lib_hparams (line 37) | def get_hub_lib_hparams(**kwargs): function _get_model_info (line 43) | def _get_model_info(model_spec, class ImageClassifier (line 79) | class ImageClassifier(classification_model.ClassificationModel): method __init__ (line 82) | def __init__( method _get_tflite_input_tensors (line 120) | def _get_tflite_input_tensors(self, input_tensors): method create_model (line 124) | def create_model(self, hparams=None, with_loss_and_metrics=False): method train (line 142) | def train(self, method _export_tflite (line 200) | def _export_tflite(self, method _get_hparams_or_default (line 250) | def _get_hparams_or_default(self, hparams): method create (line 255) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/image_classifier_test.py function _fill_image (line 32) | def _fill_image(rgb, image_size): class ImageClassifierTest (line 39) | class ImageClassifierTest(tf.test.TestCase): method _gen (line 46) | def _gen(self): method _gen_cmy_data (line 51) | def _gen_cmy_data(self): method setUp (line 59) | def setUp(self): method test_mobilenetv2_model (line 66) | def test_mobilenetv2_model(self): method test_mobilenetv2_model_create_v1_incompatible (line 83) | def test_mobilenetv2_model_create_v1_incompatible(self): method test_efficientnetlite0_model_with_model_maker_retraining_lib (line 89) | def test_efficientnetlite0_model_with_model_maker_retraining_lib(self): method test_efficientnetlite0_model (line 101) | def test_efficientnetlite0_model(self): method test_efficientnetlite0_model_without_training (line 116) | def test_efficientnetlite0_model_without_training(self): method test_resnet_50_model (line 123) | def test_resnet_50_model(self): method _test_predict_top_k (line 136) | def _test_predict_top_k(self, model, threshold=0.0): method _test_accuracy (line 143) | def _test_accuracy(self, model, threshold=0.0): method _load_labels (line 147) | def _load_labels(self, filename): method _test_export_labels (line 151) | def _test_export_labels(self, model): method _test_export_to_tflite (line 156) | def _test_export_to_tflite(self, model, threshold=0.0): method _test_export_to_tflite_quantized (line 173) | def _test_export_to_tflite_quantized(self, model, model_size, err_rati... method _check_label_file (line 185) | def _check_label_file(self, labels_output_file): method _test_export_to_tflite_with_metadata (line 189) | def _test_export_to_tflite_with_metadata(self, method _test_export_to_saved_model (line 217) | def _test_export_to_saved_model(self, model): method _test_export_to_tfjs (line 224) | def _test_export_to_tfjs(self, model): FILE: tensorflow_examples/lite/model_maker/core/task/image_classifier_v1_test.py class ImageClassifierV1Test (line 24) | class ImageClassifierV1Test(image_classifier_test.ImageClassifierTest): FILE: tensorflow_examples/lite/model_maker/core/task/image_preprocessing.py class Preprocessor (line 27) | class Preprocessor(object): method __init__ (line 30) | def __init__(self, method __call__ (line 42) | def __call__(self, image, label, is_training=True): method _preprocess_with_augmentation (line 47) | def _preprocess_with_augmentation(self, image, label, is_training): method _preprocess_without_augmentation (line 62) | def _preprocess_without_augmentation(self, image, label): function distorted_bounding_box_crop (line 74) | def distorted_bounding_box_crop(image, function _at_least_x_are_equal (line 125) | def _at_least_x_are_equal(a, b, x): function _resize_image (line 132) | def _resize_image(image, image_size, method=None): function _decode_and_random_crop (line 141) | def _decode_and_random_crop(original_image, image_size, resize_method=No... function _decode_and_center_crop (line 161) | def _decode_and_center_crop(image, image_size, resize_method=None): function _flip (line 180) | def _flip(image): function preprocess_for_train (line 186) | def preprocess_for_train(image, function preprocess_for_eval (line 209) | def preprocess_for_eval(image, FILE: tensorflow_examples/lite/model_maker/core/task/image_preprocessing_test.py function _get_preprocessed_image (line 25) | def _get_preprocessed_image(preprocessor, is_training=False): class PreprocessorTest (line 42) | class PreprocessorTest(tf.test.TestCase): method test_without_augmentation (line 44) | def test_without_augmentation(self): method test_with_augmentation (line 58) | def test_with_augmentation(self): FILE: tensorflow_examples/lite/model_maker/core/task/make_image_classifier.py class HParams (line 20) | class HParams( function get_default_hparams (line 56) | def get_default_hparams(): function build_model (line 78) | def build_model(module_layer, hparams, image_size, num_classes): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writer_for_image_classifier.py function define_flags (line 36) | def define_flags(): class ModelSpecificInfo (line 47) | class ModelSpecificInfo(object): method __init__ (line 50) | def __init__(self, name, version, image_width, image_height, image_min, class MetadataPopulatorForImageClassifier (line 80) | class MetadataPopulatorForImageClassifier(object): method __init__ (line 83) | def __init__(self, model_file, model_info, label_file_path): method populate (line 89) | def populate(self): method _create_metadata (line 94) | def _create_metadata(self): method _populate_metadata (line 165) | def _populate_metadata(self): function main (line 173) | def main(_): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writers/bert/metadata_writer_for_bert.py class Tokenizer (line 32) | class Tokenizer(enum.Enum): function bert_qa_inputs (line 37) | def bert_qa_inputs(ids_name, mask_name, segment_ids_name): class ModelSpecificInfo (line 57) | class ModelSpecificInfo(object): method __init__ (line 60) | def __init__(self, class MetadataPopulatorForBert (line 104) | class MetadataPopulatorForBert(metadata_writer.MetadataWriter): method __init__ (line 107) | def __init__(self, model_file, export_directory, model_info): method _create_metadata (line 118) | def _create_metadata(self): method _create_input_metadata (line 151) | def _create_input_metadata(self): method _create_output_metadata (line 196) | def _create_output_metadata(self): method _create_bert_tokenizer (line 204) | def _create_bert_tokenizer(self): method _create_sentence_piece_tokenizer (line 215) | def _create_sentence_piece_tokenizer(self): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writers/bert/question_answerer/metadata_writer_for_bert_question_answerer.py function bert_qa_outputs (line 28) | def bert_qa_outputs(start_logits_name, end_logits_name): class QuestionAnswererInfo (line 46) | class QuestionAnswererInfo(ModelSpecificInfo): method __init__ (line 49) | def __init__(self, class MetadataPopulatorForBertQuestionAndAnswer (line 119) | class MetadataPopulatorForBertQuestionAndAnswer(MetadataPopulatorForBert): method _create_output_metadata (line 122) | def _create_output_metadata(self): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writers/bert/text_classifier/metadata_writer_for_bert_text_classifier.py class ClassifierSpecificInfo (line 30) | class ClassifierSpecificInfo(ModelSpecificInfo): method __init__ (line 33) | def __init__(self, class MetadataPopulatorForBertTextClassifier (line 87) | class MetadataPopulatorForBertTextClassifier(MetadataPopulatorForBert): method __init__ (line 90) | def __init__(self, model_file, export_directory, model_info): method _create_output_metadata (line 104) | def _create_output_metadata(self): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writers/metadata_writer.py class MetadataWriter (line 31) | class MetadataWriter(abc.ABC): method __init__ (line 34) | def __init__(self, model_file, export_directory, associated_files): method populate (line 48) | def populate(self, export_metadata_json_file=False): method _create_metadata (line 54) | def _create_metadata(self): method _get_subgraph (line 57) | def _get_subgraph(self): method _get_input_tensor_names (line 70) | def _get_input_tensor_names(self): method _get_output_tensor_names (line 80) | def _get_output_tensor_names(self): method _order_tensor_metadata_with_names (line 90) | def _order_tensor_metadata_with_names(self, tensor_metadata, tensor_na... method _populate_metadata (line 119) | def _populate_metadata(self, export_metadata_json_file=False): FILE: tensorflow_examples/lite/model_maker/core/task/metadata_writers/text_classifier/metadata_writer_for_text_classifier.py class ModelSpecificInfo (line 40) | class ModelSpecificInfo(object): method __init__ (line 43) | def __init__(self, class MetadataPopulatorForTextClassifier (line 70) | class MetadataPopulatorForTextClassifier(metadata_writer.MetadataWriter): method __init__ (line 73) | def __init__(self, model_file, export_directory, model_info, label_fil... method _create_metadata (line 80) | def _create_metadata(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/__init__.py function get (line 102) | def get(spec_or_str, *args, **kwargs): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/audio_spec.py class MetadataWriter (line 42) | class MetadataWriter: method __init__ (line 61) | def __init__(self, tflite_filepath, **kwargs): method __enter__ (line 67) | def __enter__(self): method __exit__ (line 71) | def __exit__(self, exc_type, exc_val, exc_tb): method add_input (line 76) | def add_input(self, **kwargs): method add_output (line 80) | def add_output(self, name, labels, **kwargs): method save (line 109) | def save(self, tflite_filepath=None, json_filepath=None): function _ensure_tf25 (line 128) | def _ensure_tf25(tf_version): function _get_tf_version (line 136) | def _get_tf_version(): class BaseSpec (line 140) | class BaseSpec(abc.ABC): method __init__ (line 143) | def __init__(self, model_dir=None, strategy=None): method target_sample_rate (line 152) | def target_sample_rate(self): method create_model (line 156) | def create_model(self, num_classes, train_whole_model=False): method run_classifier (line 160) | def run_classifier(self, model, epochs, train_ds, validation_ds, **kwa... method preprocess_ds (line 163) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): method get_default_quantization_config (line 169) | def get_default_quantization_config(self): function _remove_suffix_if_possible (line 174) | def _remove_suffix_if_possible(text, suffix): function _load_browser_fft_preprocess_model (line 181) | def _load_browser_fft_preprocess_model(): function _load_tfjs_speech_command_model (line 201) | def _load_tfjs_speech_command_model(): class BrowserFFTSpec (line 217) | class BrowserFFTSpec(BaseSpec): method __init__ (line 241) | def __init__(self, model_dir=None, strategy=None): method target_sample_rate (line 255) | def target_sample_rate(self): method _ensure_length (line 262) | def _ensure_length(self, wav, unused_label): method _split (line 269) | def _split(self, wav, label): method _preprocess (line 285) | def _preprocess(self, x, label): method preprocess_ds (line 297) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): method create_model (line 308) | def create_model(self, num_classes, train_whole_model=False): method run_classifier (line 326) | def run_classifier(self, model, epochs, train_ds, validation_ds, **kwa... method create_serving_model (line 334) | def create_serving_model(self, training_model): method _export_metadata (line 343) | def _export_metadata(self, tflite_filepath, index_to_label, method export_tflite (line 368) | def export_tflite(self, class YAMNetSpec (line 412) | class YAMNetSpec(BaseSpec): method __init__ (line 440) | def __init__( method target_sample_rate (line 473) | def target_sample_rate(self): method create_model (line 476) | def create_model(self, num_classes, train_whole_model=False): method run_classifier (line 487) | def run_classifier(self, model, epochs, train_ds, validation_ds, **kwa... method _frame (line 503) | def _frame(self, wav, label): method _extract_embedding (line 514) | def _extract_embedding(self, wav, label): method _add_noise (line 523) | def _add_noise(self, embedding, label): method preprocess_ds (line 528) | def preprocess_ds(self, ds, is_training=False, cache_fn=None): method _yamnet_labels (line 541) | def _yamnet_labels(self): method _export_metadata (line 552) | def _export_metadata(self, tflite_filepath, index_to_label, method create_serving_model (line 583) | def create_serving_model(self, training_model): method export_tflite (line 604) | def export_tflite(self, FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/audio_spec_test.py function _gen_dataset (line 31) | def _gen_dataset(spec, total_samples, num_classes, batch_size, seed): class BaseSpecTest (line 63) | class BaseSpecTest(tf.test.TestCase): method testEnsureVersion (line 65) | def testEnsureVersion(self): class BaseTest (line 86) | class BaseTest(tf.test.TestCase): method _train_and_export (line 88) | def _train_and_export(self, class YAMNetSpecTest (line 117) | class YAMNetSpecTest(BaseTest): method _test_preprocess (line 119) | def _test_preprocess(self, input_shape, input_count, output_shape, method test_preprocess (line 144) | def test_preprocess(self): method test_create_model (line 160) | def test_create_model(self): method test_yamnet_two_heads (line 169) | def test_yamnet_two_heads(self): method test_yamnet_single_head (line 263) | def test_yamnet_single_head(self): method test_no_metadata (line 330) | def test_no_metadata(self): method test_binary_classification (line 343) | def test_binary_classification(self): method test_dynamic_range_quantization (line 350) | def test_dynamic_range_quantization(self): class BrowserFFTSpecTest (line 362) | class BrowserFFTSpecTest(BaseTest): method setUpClass (line 365) | def setUpClass(cls): method test_model_initialization (line 369) | def test_model_initialization(self): method test_create_model (line 381) | def test_create_model(self): method test_dynamic_range_quantization (line 400) | def test_dynamic_range_quantization(self): method test_binary_classification (line 409) | def test_binary_classification(self): method test_basic_training (line 416) | def test_basic_training(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/image_spec.py class ImageModelSpec (line 29) | class ImageModelSpec(object): method __init__ (line 35) | def __init__(self, method get_default_quantization_config (line 56) | def get_default_quantization_config(self, representative_data): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/model_spec_test.py class ModelSpecTest (line 36) | class ModelSpecTest(tf.test.TestCase, parameterized.TestCase): method test_get (line 38) | def test_get(self): method test_get_not_none (line 49) | def test_get_not_none(self, model): method test_get_not_none_audio_models (line 57) | def test_get_not_none_audio_models(self, model): method test_get_not_none_recommendation_models (line 62) | def test_get_not_none_recommendation_models(self, model): method test_get_raises (line 69) | def test_get_raises(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/object_detector_spec.py function _get_ordered_label_map (line 45) | def _get_ordered_label_map( class ExportModel (line 56) | class ExportModel(efficientdet_keras.EfficientDetModel): method __init__ (line 59) | def __init__(self, method __call__ (line 83) | def __call__(self, inputs: tf.Tensor): class EfficientDetModelSpec (line 110) | class EfficientDetModelSpec(object): method __init__ (line 115) | def __init__(self, method create_model (line 235) | def create_model(self) -> tf.keras.Model: method train (line 240) | def train(self, method _get_evaluator_and_label_map (line 274) | def _get_evaluator_and_label_map( method _get_metric_dict (line 289) | def _get_metric_dict(self, evaluator: coco_metric.EvaluationMetric, method evaluate (line 303) | def evaluate(self, method evaluate_tflite (line 348) | def evaluate_tflite(self, method export_saved_model (line 403) | def export_saved_model(self, method get_default_quantization_config (line 448) | def get_default_quantization_config( method export_tflite (line 466) | def export_tflite( FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/object_detector_spec_test.py class EfficientDetModelSpecTest (line 25) | class EfficientDetModelSpecTest(tf.test.TestCase): method setUpClass (line 28) | def setUpClass(cls): method test_export_saved_model (line 36) | def test_export_saved_model(self): method test_export_tflite (line 42) | def test_export_tflite(self): method test_create_model (line 48) | def test_create_model(self): method test_train (line 55) | def test_train(self): method test_evaluate (line 68) | def test_evaluate(self): method _gen_input (line 74) | def _gen_input(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/recommendation_spec.py class RecommendationSpec (line 24) | class RecommendationSpec(object): method __init__ (line 29) | def __init__(self, input_spec: recommendation_config.InputSpec, method create_model (line 40) | def create_model(self): method get_default_quantization_config (line 48) | def get_default_quantization_config(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/recommendation_spec_test.py class RecommendationSpecTest (line 24) | class RecommendationSpecTest(tf.test.TestCase, parameterized.TestCase): method test_create_recommendation_model (line 31) | def test_create_recommendation_model(self, encoder_type): FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/text_spec.py class AverageWordVecModelSpec (line 56) | class AverageWordVecModelSpec(object): method __init__ (line 66) | def __init__(self, method get_name_to_features (line 106) | def get_name_to_features(self): method select_data_from_record (line 114) | def select_data_from_record(self, record): method convert_examples_to_features (line 120) | def convert_examples_to_features(self, examples, tfrecord_file, label_... method create_model (line 137) | def create_model(self, method run_classifier (line 161) | def run_classifier(self, train_ds, validation_ds, epochs, steps_per_ep... method gen_vocab (line 181) | def gen_vocab(self, examples): method preprocess (line 197) | def preprocess(self, raw_text): method _tokenize (line 218) | def _tokenize(self, text): method save_vocab (line 226) | def save_vocab(self, vocab_filename): method load_vocab (line 234) | def load_vocab(self, vocab_filename): method get_config (line 244) | def get_config(self): method get_default_quantization_config (line 253) | def get_default_quantization_config(self): function create_classifier_model (line 258) | def create_classifier_model(bert_config, class BertModelSpec (line 326) | class BertModelSpec(object): method __init__ (line 333) | def __init__( method get_default_quantization_config (line 420) | def get_default_quantization_config(self): method reorder_input_details (line 426) | def reorder_input_details(self, tflite_input_details): method build (line 438) | def build(self): method save_vocab (line 447) | def save_vocab(self, vocab_filename): class BertClassifierModelSpec (line 456) | class BertClassifierModelSpec(BertModelSpec): method __init__ (line 459) | def __init__( method get_name_to_features (line 523) | def get_name_to_features(self): method select_data_from_record (line 534) | def select_data_from_record(self, record): method convert_examples_to_features (line 544) | def convert_examples_to_features(self, examples, tfrecord_file, label_... method create_model (line 551) | def create_model(self, method run_classifier (line 579) | def run_classifier(self, train_ds, validation_ds, epochs, steps_per_ep... method get_config (line 623) | def get_config(self): function dump_to_files (line 629) | def dump_to_files(all_predictions, all_nbest_json, scores_diff_json, function create_qa_model (line 645) | def create_qa_model(bert_config, function create_qa_model_from_squad (line 705) | def create_qa_model_from_squad(max_seq_length, class BertQAModelSpec (line 755) | class BertQAModelSpec(BertModelSpec): method __init__ (line 758) | def __init__( method get_name_to_features (line 831) | def get_name_to_features(self, is_training): method select_data_from_record (line 847) | def select_data_from_record(self, record): method get_config (line 861) | def get_config(self): method convert_examples_to_features (line 871) | def convert_examples_to_features(self, examples, is_training, output_fn, method create_model (line 887) | def create_model(self): method train (line 901) | def train(self, train_ds, epochs, steps_per_epoch, **kwargs): method _predict (line 948) | def _predict(self, model, dataset, num_steps): method predict (line 982) | def predict(self, model, dataset, num_steps): method reorder_output_details (line 986) | def reorder_output_details(self, tflite_output_details): method predict_tflite (line 996) | def predict_tflite(self, tflite_filepath, dataset): method evaluate (line 1016) | def evaluate(self, model, tflite_filepath, dataset, num_steps, eval_ex... FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/text_spec_test.py function _gen_examples (line 29) | def _gen_examples(): function _get_dataset_from_tfrecord (line 39) | def _get_dataset_from_tfrecord(tfrecord_file, name_to_features): class AverageWordVecModelSpecTest (line 50) | class AverageWordVecModelSpecTest(tf.test.TestCase): method setUp (line 52) | def setUp(self): method test_tokenize (line 60) | def test_tokenize(self): method test_convert_examples_to_features (line 69) | def test_convert_examples_to_features(self): method test_preprocess (line 83) | def test_preprocess(self): method test_gen_vocab (line 88) | def test_gen_vocab(self): method test_save_load_vocab (line 97) | def test_save_load_vocab(self): method test_run_classifier (line 103) | def test_run_classifier(self): method test_create_model_without_compilation (line 113) | def test_create_model_without_compilation(self): method _gen_random_ds (line 124) | def _gen_random_ds(self, num_classes, data_size=1, batch_size=4): class BertClassifierModelSpecTest (line 139) | class BertClassifierModelSpecTest(tf.test.TestCase, parameterized.TestCa... method test_bert (line 145) | def test_bert(self, uri, is_tf2): method _test_convert_examples_to_features (line 152) | def _test_convert_examples_to_features(self, model_spec): method _test_run_classifier (line 177) | def _test_run_classifier(self, model_spec): method _test_create_model_without_compilation (line 187) | def _test_create_model_without_compilation(self, model_spec): method _gen_random_ds (line 198) | def _gen_random_ds(self, seq_len, num_classes, data_size=1, batch_size... FILE: tensorflow_examples/lite/model_maker/core/task/model_spec/util.py function dict_with_default (line 22) | def dict_with_default(default_dict, **updates): function create_int_feature (line 27) | def create_int_feature(values): function get_num_gpus (line 32) | def get_num_gpus(num_gpus): function wrap_doc (line 42) | def wrap_doc(func_or_class, short_desciption): FILE: tensorflow_examples/lite/model_maker/core/task/model_util.py function set_batch_size (line 38) | def set_batch_size(model, batch_size): function get_steps_per_epoch (line 45) | def get_steps_per_epoch(steps_per_epoch=None, batch_size=None, train_dat... function _create_temp_dir (line 72) | def _create_temp_dir(convert_from_saved_model): class DummyContextManager (line 80) | class DummyContextManager(object): method __enter__ (line 82) | def __enter__(self): method __exit__ (line 85) | def __exit__(self, *args): function export_labels (line 89) | def export_labels(filepath, index_to_label): function export_saved_model (line 94) | def export_saved_model(model, function export_tflite (line 130) | def export_tflite(model, function get_lite_runner (line 180) | def get_lite_runner(tflite_filepath, model_spec=None): function _get_input_tensor (line 196) | def _get_input_tensor(input_tensors, input_details, i): class LiteRunner (line 210) | class LiteRunner(object): method __init__ (line 213) | def __init__(self, method run (line 240) | def run(self, input_tensors): function export_tfjs (line 293) | def export_tfjs(keras_or_saved_model, function load_tfjs_keras_model (line 330) | def load_tfjs_keras_model(model_path): function extract_tflite_metadata_json (line 336) | def extract_tflite_metadata_json(tflite_filepath): FILE: tensorflow_examples/lite/model_maker/core/task/model_util_test.py function _get_quantization_config_list (line 28) | def _get_quantization_config_list(input_dim, num_classes, max_input_value): function _mock_gen_dataset (line 46) | def _mock_gen_dataset(data, batch_size=1, is_training=False): # pylint:... class ModelUtilTest (line 52) | class ModelUtilTest(tf.test.TestCase): method test_export_tflite (line 55) | def test_export_tflite(self): method test_export_tflite_quantized (line 63) | def test_export_tflite_quantized(self): method _test_tflite (line 79) | def _test_tflite(self, method test_export_tfjs (line 94) | def test_export_tfjs(self): method test_export_tfjs_saved_model (line 106) | def test_export_tfjs_saved_model(self): FILE: tensorflow_examples/lite/model_maker/core/task/model_util_v1_test.py class ModelUtilTest (line 24) | class ModelUtilTest(model_util_test.ModelUtilTest): FILE: tensorflow_examples/lite/model_maker/core/task/object_detector.py class ObjectDetector (line 38) | class ObjectDetector(custom_model.CustomModel): method __init__ (line 44) | def __init__( method create_model (line 73) | def create_model(self) -> tf.keras.Model: method _get_dataset_and_steps (line 77) | def _get_dataset_and_steps( method train (line 92) | def train(self, method evaluate (line 127) | def evaluate(self, method evaluate_tflite (line 150) | def evaluate_tflite( method _export_saved_model (line 158) | def _export_saved_model(self, saved_model_dir: str) -> None: method _export_tflite (line 162) | def _export_tflite( method _export_labels (line 206) | def _export_labels(self, label_filepath: str) -> None: method create (line 220) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/object_detector_test.py class ObjectDetectorTest (line 32) | class ObjectDetectorTest(tf.test.TestCase): method testEfficientDetLite0 (line 34) | def testEfficientDetLite0(self): FILE: tensorflow_examples/lite/model_maker/core/task/question_answer.py function _get_model_info (line 34) | def _get_model_info(model_spec, vocab_file): class QuestionAnswer (line 52) | class QuestionAnswer(custom_model.CustomModel): method train (line 59) | def train(self, method create_model (line 84) | def create_model(self): method evaluate (line 87) | def evaluate(self, method evaluate_tflite (line 120) | def evaluate_tflite(self, method _export_tflite (line 153) | def _export_tflite(self, method create (line 194) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/question_answer_test.py function _get_data (line 35) | def _get_data(model_spec, version): class QuestionAnswerTest (line 53) | class QuestionAnswerTest(tf.test.TestCase, parameterized.TestCase): method test_bert_model_v1_incompatible (line 56) | def test_bert_model_v1_incompatible(self): method test_bert_model (line 61) | def test_bert_model(self): method _test_model_without_training (line 76) | def _test_model_without_training(self, model_spec, train_data, method test_mobilebert_model (line 89) | def test_mobilebert_model(self, spec, trainable): method _test_f1_score (line 101) | def _test_f1_score(self, model, validation_data, threshold): method _test_export_vocab (line 105) | def _test_export_vocab(self, model): method _test_export_to_tflite (line 112) | def _test_export_to_tflite(self, method _test_export_to_saved_model (line 158) | def _test_export_to_saved_model(self, model): FILE: tensorflow_examples/lite/model_maker/core/task/question_answer_v1_test.py class QuestionAnswerV1Test (line 24) | class QuestionAnswerV1Test(question_answer_test.QuestionAnswerTest): FILE: tensorflow_examples/lite/model_maker/core/task/recommendation.py class Recommendation (line 35) | class Recommendation(custom_model.CustomModel): method __init__ (line 45) | def __init__(self, method input_spec (line 69) | def input_spec(self) -> recommendation_config.InputSpec: method model_hparams (line 73) | def model_hparams(self) -> recommendation_config.ModelHParams: method create_model (line 76) | def create_model(self, do_train=True): method train (line 90) | def train(self, method evaluate (line 127) | def evaluate(self, data, batch_size=10): method _keras_callbacks (line 143) | def _keras_callbacks(self, model_dir): method _get_serve_fn (line 147) | def _get_serve_fn(self, keras_model): method _export_tflite (line 152) | def _export_tflite(self, tflite_filepath): method _export_saved_model (line 168) | def _export_saved_model(self, filepath): method evaluate_tflite (line 173) | def evaluate_tflite(self, tflite_filepath, data): method create (line 214) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/recommendation_test.py class RecommendationTest (line 27) | class RecommendationTest(parameterized.TestCase, tf.test.TestCase): method setUp (line 29) | def setUp(self): method test_create (line 44) | def test_create(self, encoder_type): method test_evaluate (line 59) | def test_evaluate(self): method test_export_and_evaluation (line 74) | def test_export_and_evaluation(self): method _test_evaluate_tflite (line 104) | def _test_evaluate_tflite(self, model, tflite_filepath): FILE: tensorflow_examples/lite/model_maker/core/task/searcher.py class ExportFormat (line 40) | class ExportFormat(enum.Enum): class Tree (line 47) | class Tree: class ScoreAH (line 87) | class ScoreAH: class ScoreBruteForce (line 123) | class ScoreBruteForce: class ScaNNOptions (line 133) | class ScaNNOptions: class Searcher (line 160) | class Searcher(object): method __init__ (line 163) | def __init__(self, method create_from_server_scann (line 181) | def create_from_server_scann( method create_from_data (line 201) | def create_from_data(cls, method export (line 247) | def export(self, FILE: tensorflow_examples/lite/model_maker/core/task/searcher_test.py class SearcherTest (line 32) | class SearcherTest(tf.test.TestCase, parameterized.TestCase): method test_searcher_with_image_embedder (line 34) | def test_searcher_with_image_embedder(self): method test_searcher_with_text_embedder (line 102) | def test_searcher_with_text_embedder(self): method test_searcher_with_3_inputs_models (line 169) | def test_searcher_with_3_inputs_models(self, tflite_filename, url, dim): FILE: tensorflow_examples/lite/model_maker/core/task/text_classifier.py function _get_bert_model_info (line 36) | def _get_bert_model_info(model_spec, vocab_file, label_file): function _get_model_info (line 50) | def _get_model_info(model_name): class TextClassifier (line 58) | class TextClassifier(classification_model.ClassificationModel): method __init__ (line 67) | def __init__(self, method create_model (line 84) | def create_model(self, with_loss_and_metrics=True): method train (line 88) | def train(self, method _export_tflite (line 122) | def _export_tflite(self, method create (line 178) | def create(cls, FILE: tensorflow_examples/lite/model_maker/core/task/text_classifier_test.py class TextClassifierTest (line 33) | class TextClassifierTest(tf.test.TestCase): method _gen_text_dir (line 36) | def _gen_text_dir(self, text_per_class=1): method setUp (line 50) | def setUp(self): method test_average_wordvec_model_create_v1_incompatible (line 56) | def test_average_wordvec_model_create_v1_incompatible(self): method test_bert_model (line 67) | def test_bert_model(self): method test_mobilebert_model (line 85) | def test_mobilebert_model(self): method test_mobilebert_model_without_training_for_tfjs (line 103) | def test_mobilebert_model_without_training_for_tfjs(self): method test_average_wordvec_model (line 113) | def test_average_wordvec_model(self): method _test_model_without_training (line 137) | def _test_model_without_training(self, model_spec): method _test_accuracy (line 145) | def _test_accuracy(self, model, threshold=1.0): method _test_predict_top_k (line 149) | def _test_predict_top_k(self, model): method _load_vocab (line 156) | def _load_vocab(self, filepath): method _load_labels (line 160) | def _load_labels(self, filepath): method _test_export_labels (line 164) | def _test_export_labels(self, model): method _test_export_vocab (line 171) | def _test_export_vocab(self, model): method _test_export_to_tflite (line 187) | def _test_export_to_tflite(self, method _test_export_to_saved_model (line 234) | def _test_export_to_saved_model(self, model): method _test_export_to_tfjs (line 241) | def _test_export_to_tfjs(self, model): method _test_export_to_tflite_quant (line 250) | def _test_export_to_tflite_quant(self, model, model_size, err_ratio=0.... FILE: tensorflow_examples/lite/model_maker/core/task/text_classifier_v1_test.py class TextClassifierV1Test (line 24) | class TextClassifierV1Test(text_classifier_test.TextClassifierTest): FILE: tensorflow_examples/lite/model_maker/core/task/train_image_classifier_lib.py function add_params (line 34) | def add_params(hparams, **kwargs): class HParams (line 40) | class HParams( method get_hparams (line 60) | def get_hparams(cls, **kwargs): function get_default_hparams (line 66) | def get_default_hparams(): function create_optimizer (line 83) | def create_optimizer(init_lr, num_decay_steps, num_warmup_steps): function get_default_callbacks (line 102) | def get_default_callbacks(model_dir): function hub_train_model (line 114) | def hub_train_model(model, hparams, train_ds, validation_ds, steps_per_e... function train_model (line 155) | def train_model(model, hparams, train_ds, validation_ds, steps_per_epoch): FILE: tensorflow_examples/lite/model_maker/core/test_util.py function test_srcdir (line 36) | def test_srcdir(): function get_test_data_path (line 46) | def get_test_data_path(file_or_dirname): function get_cache_dir (line 55) | def get_cache_dir(temp_dir, filename): function test_in_tf_1 (line 70) | def test_in_tf_1(fn): function test_in_tf_2 (line 84) | def test_in_tf_2(fn): function test_in_tf_1and2 (line 98) | def test_in_tf_1and2(fn): function build_model (line 112) | def build_model(input_shape, num_classes): function get_dataloader (line 127) | def get_dataloader(data_size, input_shape, num_classes, max_input_value=... function create_pascal_voc (line 143) | def create_pascal_voc(temp_dir=None): function is_same_output (line 168) | def is_same_output(tflite_file, FILE: tensorflow_examples/lite/model_maker/core/utils/ondevice_scann_builder.py function builder (line 22) | def builder(db, num_neighbors, distance_measure): class OndeviceScannBuilder (line 33) | class OndeviceScannBuilder(scann_builder.ScannBuilder): method create_config (line 36) | def create_config(self): FILE: tensorflow_examples/lite/model_maker/core/utils/ondevice_scann_builder_test.py class OndeviceScannBuilderTest (line 23) | class OndeviceScannBuilderTest(tf.test.TestCase): method test_create_from_config_bruteforce (line 25) | def test_create_from_config_bruteforce(self): method test_create_from_config_ah (line 44) | def test_create_from_config_ah(self): FILE: tensorflow_examples/lite/model_maker/core/utils/scann_converter.py class OnDeviceArtifacts (line 45) | class OnDeviceArtifacts(NamedTuple): function get_distance_measure (line 52) | def get_distance_measure( function get_indexer (line 59) | def get_indexer( function get_partitioner (line 97) | def get_partitioner( function convert_serialized_to_on_device (line 123) | def convert_serialized_to_on_device(serialized_path: str) -> OnDeviceArt... function convert_artifacts_to_leveldb (line 191) | def convert_artifacts_to_leveldb(output_file_path: str, FILE: tensorflow_examples/lite/model_maker/core/utils/scann_converter_test.py class ScannConverterTest (line 38) | class ScannConverterTest(tf.test.TestCase, parameterized.TestCase): method setUp (line 40) | def setUp(self): method tearDown (line 45) | def tearDown(self): method test_converts_files_properly (line 99) | def test_converts_files_properly(self, distance: str, tree: bool, ah: ... method _verify_ah_centers (line 159) | def _verify_ah_centers( method _verify_partition_centroids (line 179) | def _verify_partition_centroids( method test_generates_index_leveldb_file (line 199) | def test_generates_index_leveldb_file(self, hashed: bool, compressed: ... FILE: tensorflow_examples/lite/model_maker/demo/audio_classification_demo.py function _define_flags (line 55) | def _define_flags(): function _download_dataset (line 69) | def _download_dataset(filename, url, extracted_folder_name, **kwargs): function download_bird_dataset (line 82) | def download_bird_dataset(**kwargs): function download_speech_commands_dataset (line 90) | def download_speech_commands_dataset(**kwargs): function download_esc50_dataset (line 98) | def download_esc50_dataset(**kwargs): function run (line 105) | def run(spec, function main (line 173) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/audio_classification_demo_test.py function patch_data_loader (line 34) | def patch_data_loader(): class AudioClassificationDemoTest (line 55) | class AudioClassificationDemoTest(tf.test.TestCase, parameterized.TestCa... method test_audio_classification_demo (line 61) | def test_audio_classification_demo(self, spec, dataset): FILE: tensorflow_examples/lite/model_maker/demo/custom_model_demo.py function define_flags (line 46) | def define_flags(): class DataLoader (line 53) | class DataLoader(dataloader.DataLoader): method create (line 57) | def create(cls, spec, is_training=True, shuffle=False): class BinaryClassificationBaseSpec (line 72) | class BinaryClassificationBaseSpec(abc.ABC): method __init__ (line 77) | def __init__(self, model_dir=None, strategy=None): method create_model (line 85) | def create_model(self): method run_classifier (line 89) | def run_classifier(self, model, epochs, train_ds, train_steps, validat... method preprocess_ds (line 93) | def preprocess_ds(self, ds, is_training=False): class Spec (line 98) | class Spec(BinaryClassificationBaseSpec): method preprocess_ds (line 101) | def preprocess_ds(self, ds, is_training=False): method create_model (line 112) | def create_model(self): method run_classifier (line 119) | def run_classifier(self, model, epochs, train_ds, train_steps, validat... class BinaryClassifier (line 138) | class BinaryClassifier(custom_model.CustomModel): method __init__ (line 141) | def __init__(self, spec, shuffle=True): method train (line 145) | def train(self, train_data, validation_data, epochs=10, batch_size=4): method evaluate (line 167) | def evaluate(self, data, batch_size=4): method evaluate_tflite (line 171) | def evaluate_tflite(self, tflite_filepath, data): function train_xor_model (line 196) | def train_xor_model(export_dir): function main (line 229) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/custom_model_demo_test.py class DemoTest (line 27) | class DemoTest(tf.test.TestCase): method test_demo (line 29) | def test_demo(self): FILE: tensorflow_examples/lite/model_maker/demo/image_classification_demo.py function define_flags (line 35) | def define_flags(): function download_demo_data (line 43) | def download_demo_data(**kwargs): function run (line 53) | def run(data_dir, export_dir, spec='efficientnet_lite0', **kwargs): function main (line 74) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/image_classification_demo_test.py function patch_data_loader (line 32) | def patch_data_loader(): class ImageClassificationDemoTest (line 48) | class ImageClassificationDemoTest(tf.test.TestCase): method test_image_classification_demo (line 50) | def test_image_classification_demo(self): FILE: tensorflow_examples/lite/model_maker/demo/question_answer_demo.py function define_flags (line 33) | def define_flags(): function download_demo_data (line 40) | def download_demo_data(**kwargs): function run (line 53) | def run(train_data_path, function main (line 79) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/recommendation_demo.py function define_flags (line 32) | def define_flags(): function download_data (line 41) | def download_data(download_dir): function get_input_spec (line 46) | def get_input_spec(encoder_type: str, function get_model_hparams (line 92) | def get_model_hparams() -> recommendation.spec.ModelHParams: function run (line 110) | def run(data_dir, export_dir, batch_size=16, epochs=5, encoder_type='bow'): function main (line 147) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/recommendation_demo_test.py function setup_testdata (line 33) | def setup_testdata(instance): function patch_data_loader (line 54) | def patch_data_loader(): class RecommendationDemoTest (line 68) | class RecommendationDemoTest(tf.test.TestCase): method setUp (line 70) | def setUp(self): method test_recommendation_demo (line 74) | def test_recommendation_demo(self): FILE: tensorflow_examples/lite/model_maker/demo/text_classification_demo.py function define_flags (line 35) | def define_flags(): function download_demo_data (line 43) | def download_demo_data(**kwargs): function run (line 53) | def run(data_dir, export_dir, spec='mobilebert_classifier', **kwargs): function main (line 90) | def main(_): FILE: tensorflow_examples/lite/model_maker/demo/text_classification_demo_test.py function patch_data_loader (line 32) | def patch_data_loader(): class TextClassificationDemoTest (line 48) | class TextClassificationDemoTest(tf.test.TestCase): method test_text_classification_demo (line 50) | def test_text_classification_demo(self): FILE: tensorflow_examples/lite/model_maker/pip_package/golden_api_test.py class GoldenApiTest (line 34) | class GoldenApiTest(tf.test.TestCase, parameterized.TestCase): method test_golden_apis (line 37) | def test_golden_apis(self, package: str, import_lines: List[str]): method test_absolute_import (line 65) | def test_absolute_import(self, name: str): FILE: tensorflow_examples/lite/model_maker/pip_package/setup.py function _read_required_packages (line 102) | def _read_required_packages(fpath): function get_required_packages (line 110) | def get_required_packages(): FILE: tensorflow_examples/lite/model_maker/pip_package/setup_util.py class PackageGen (line 23) | class PackageGen: method __init__ (line 26) | def __init__( method run (line 67) | def run(self): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/aug/autoaugment.py function policy_v0 (line 37) | def policy_v0(): function policy_v1 (line 52) | def policy_v1(): function policy_vtest (line 82) | def policy_vtest(): function policy_v2 (line 93) | def policy_v2(): function policy_v3 (line 125) | def policy_v3(): function blend (line 150) | def blend(image1, image2, factor): function cutout (line 193) | def cutout(image, pad_size, replace=0): function solarize (line 244) | def solarize(image, threshold=128): function solarize_add (line 251) | def solarize_add(image, addition=0, threshold=128): function color (line 261) | def color(image, factor): function contrast (line 267) | def contrast(image, factor): function brightness (line 283) | def brightness(image, factor): function posterize (line 289) | def posterize(image, bits): function rotate (line 295) | def rotate(image, degrees, replace): function random_shift_bbox (line 320) | def random_shift_bbox(image, bbox, pixel_scaling, replace, function _clip_bbox (line 435) | def _clip_bbox(min_y, min_x, max_y, max_x): function _check_bbox_area (line 454) | def _check_bbox_area(min_y, min_x, max_y, max_x, delta=0.05): function _scale_bbox_only_op_probability (line 486) | def _scale_bbox_only_op_probability(prob): function _apply_bbox_augmentation (line 503) | def _apply_bbox_augmentation(image, bbox, augmentation_func, *args): function _concat_bbox (line 558) | def _concat_bbox(bbox, bboxes): function _apply_bbox_augmentation_wrapper (line 572) | def _apply_bbox_augmentation_wrapper(image, bbox, new_bboxes, prob, function _apply_multi_bbox_augmentation (line 617) | def _apply_multi_bbox_augmentation(image, bboxes, prob, aug_func, function _apply_multi_bbox_augmentation_wrapper (line 699) | def _apply_multi_bbox_augmentation_wrapper(image, bboxes, prob, aug_func, function rotate_only_bboxes (line 713) | def rotate_only_bboxes(image, bboxes, prob, degrees, replace): function shear_x_only_bboxes (line 721) | def shear_x_only_bboxes(image, bboxes, prob, level, replace): function shear_y_only_bboxes (line 729) | def shear_y_only_bboxes(image, bboxes, prob, level, replace): function translate_x_only_bboxes (line 737) | def translate_x_only_bboxes(image, bboxes, prob, pixels, replace): function translate_y_only_bboxes (line 745) | def translate_y_only_bboxes(image, bboxes, prob, pixels, replace): function flip_only_bboxes (line 753) | def flip_only_bboxes(image, bboxes, prob): function solarize_only_bboxes (line 761) | def solarize_only_bboxes(image, bboxes, prob, threshold): function equalize_only_bboxes (line 769) | def equalize_only_bboxes(image, bboxes, prob): function cutout_only_bboxes (line 777) | def cutout_only_bboxes(image, bboxes, prob, pad_size, replace): function _rotate_bbox (line 785) | def _rotate_bbox(bbox, image_height, image_width, degrees): function rotate_with_bboxes (line 838) | def rotate_with_bboxes(image, bboxes, degrees, replace): function translate_x (line 869) | def translate_x(image, pixels, replace): function translate_y (line 875) | def translate_y(image, pixels, replace): function _shift_bbox (line 881) | def _shift_bbox(bbox, image_height, image_width, pixels, shift_horizontal): function translate_bbox (line 922) | def translate_bbox(image, bboxes, pixels, replace, shift_horizontal): function shear_x (line 956) | def shear_x(image, level, replace): function shear_y (line 967) | def shear_y(image, level, replace): function _shear_bbox (line 978) | def _shear_bbox(bbox, image_height, image_width, level, shear_horizontal): function shear_with_bboxes (line 1028) | def shear_with_bboxes(image, bboxes, level, replace, shear_horizontal): function autocontrast (line 1063) | def autocontrast(image): function sharpness (line 1102) | def sharpness(image, factor): function equalize (line 1132) | def equalize(image): function wrap (line 1172) | def wrap(image): function unwrap (line 1180) | def unwrap(image, replace): function _cutout_inside_bbox (line 1218) | def _cutout_inside_bbox(image, bbox, pad_fraction): function bbox_cutout (line 1294) | def bbox_cutout(image, bboxes, pad_fraction, replace_with_mean): function _randomly_negate_tensor (line 1385) | def _randomly_negate_tensor(tensor): function _rotate_level_to_arg (line 1392) | def _rotate_level_to_arg(level): function _shrink_level_to_arg (line 1398) | def _shrink_level_to_arg(level): function _enhance_level_to_arg (line 1407) | def _enhance_level_to_arg(level): function _shear_level_to_arg (line 1411) | def _shear_level_to_arg(level): function _translate_level_to_arg (line 1418) | def _translate_level_to_arg(level, translate_const): function _bbox_cutout_level_to_arg (line 1425) | def _bbox_cutout_level_to_arg(level, hparams): function level_to_arg (line 1431) | def level_to_arg(hparams): function bbox_wrapper (line 1473) | def bbox_wrapper(func): function _parse_policy_info (line 1480) | def _parse_policy_info(name, prob, level, replace_value, augmentation_hp... function _apply_func_with_prob (line 1505) | def _apply_func_with_prob(func, image, args, prob, bboxes): function select_and_apply_random_policy (line 1525) | def select_and_apply_random_policy(policies, image, bboxes): function build_and_apply_nas_policy (line 1538) | def build_and_apply_nas_policy(policies, image, bboxes, function distort_image_with_autoaugment (line 1592) | def distort_image_with_autoaugment(image, function distort_image_with_randaugment (line 1632) | def distort_image_with_randaugment(image, bboxes, num_layers, magnitude): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/aug/gridmask.py class GridMask (line 22) | class GridMask(object): method __init__ (line 25) | def __init__(self, method random_rotate (line 50) | def random_rotate(self, mask): method crop (line 58) | def crop(mask, h, w): method mask (line 66) | def mask(self, h, w): method __call__ (line 106) | def __call__(self, image, label): function gridmask (line 121) | def gridmask(image, FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/aug/mosaic.py class Mosaic (line 23) | class Mosaic: method __init__ (line 31) | def __init__(self, method n_images (line 53) | def n_images(self) -> int: method out_size (line 57) | def out_size(self) -> int: method _mosaic_divide_points (line 60) | def _mosaic_divide_points(self) -> Tuple(int, int): method _scale_box (line 87) | def _scale_box(box, image, mosaic_image): method _scale_images (line 105) | def _scale_images(self, images, mosaic_divide_points): method _mosaic (line 131) | def _mosaic(self, images, boxes, mosaic_divide_points): method __call__ (line 235) | def __call__(self, images, boxes): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/autoaugment.py function policy_v0 (line 36) | def policy_v0(): function policy_vtest (line 71) | def policy_vtest(): function blend (line 82) | def blend(image1, image2, factor): function cutout (line 125) | def cutout(image, pad_size, replace=0): function solarize (line 176) | def solarize(image, threshold=128): function solarize_add (line 183) | def solarize_add(image, addition=0, threshold=128): function color (line 193) | def color(image, factor): function contrast (line 199) | def contrast(image, factor): function brightness (line 216) | def brightness(image, factor): function posterize (line 222) | def posterize(image, bits): function rotate (line 228) | def rotate(image, degrees, replace): function translate_x (line 253) | def translate_x(image, pixels, replace): function translate_y (line 259) | def translate_y(image, pixels, replace): function shear_x (line 265) | def shear_x(image, level, replace): function shear_y (line 276) | def shear_y(image, level, replace): function autocontrast (line 287) | def autocontrast(image): function sharpness (line 326) | def sharpness(image, factor): function equalize (line 358) | def equalize(image): function invert (line 398) | def invert(image): function wrap (line 404) | def wrap(image): function unwrap (line 412) | def unwrap(image, replace): function _randomly_negate_tensor (line 470) | def _randomly_negate_tensor(tensor): function _rotate_level_to_arg (line 477) | def _rotate_level_to_arg(level): function _shrink_level_to_arg (line 483) | def _shrink_level_to_arg(level): function _enhance_level_to_arg (line 492) | def _enhance_level_to_arg(level): function _shear_level_to_arg (line 496) | def _shear_level_to_arg(level): function _translate_level_to_arg (line 503) | def _translate_level_to_arg(level, translate_const): function level_to_arg (line 510) | def level_to_arg(hparams): function _parse_policy_info (line 535) | def _parse_policy_info(name, prob, level, replace_value, augmentation_hp... function _apply_func_with_prob (line 558) | def _apply_func_with_prob(func, image, args, prob): function select_and_apply_random_policy (line 579) | def select_and_apply_random_policy(policies, image): function build_and_apply_nas_policy (line 592) | def build_and_apply_nas_policy(policies, image, function distort_image_with_autoaugment (line 641) | def distort_image_with_autoaugment(image, augmentation_name): function distort_image_with_randaugment (line 672) | def distort_image_with_randaugment(image, num_layers, magnitude): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/backbone_factory.py function get_model_builder (line 25) | def get_model_builder(model_name): function get_model (line 35) | def get_model(model_name, override_params=None, model_dir=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/efficientnet_builder.py function efficientnet_params (line 31) | def efficientnet_params(model_name): class BlockDecoder (line 49) | class BlockDecoder(object): method _decode_block_string (line 52) | def _decode_block_string(self, block_string): method _encode_block_string (line 81) | def _encode_block_string(self, block): method decode (line 102) | def decode(self, string_list): method encode (line 117) | def encode(self, blocks_args): function swish (line 131) | def swish(features, use_native=True, use_hard=False): function efficientnet (line 171) | def efficientnet(width_coefficient=None, function get_model_params (line 197) | def get_model_params(model_name, override_params): function build_model (line 219) | def build_model(images, function build_model_base (line 292) | def build_model_base(images, model_name, training, override_params=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/efficientnet_lite_builder.py function efficientnet_lite_params (line 33) | def efficientnet_lite_params(model_name): function efficientnet_lite (line 54) | def efficientnet_lite(width_coefficient=None, function get_model_params (line 82) | def get_model_params(model_name, override_params): function build_model (line 104) | def build_model(images, function build_model_base (line 175) | def build_model_base(images, model_name, training, override_params=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/efficientnet_model.py function conv_kernel_initializer (line 53) | def conv_kernel_initializer(shape, dtype=None, partition_info=None): function dense_kernel_initializer (line 77) | def dense_kernel_initializer(shape, dtype=None, partition_info=None): function superpixel_kernel_initializer (line 98) | def superpixel_kernel_initializer(shape, dtype='float32', partition_info... function round_filters (line 129) | def round_filters(filters, global_params, skip=False): function round_repeats (line 146) | def round_repeats(repeats, global_params, skip=False): class SE (line 154) | class SE(tf.keras.layers.Layer): method __init__ (line 157) | def __init__(self, global_params, se_filters, output_filters, name=None): method call (line 184) | def call(self, inputs): class SuperPixel (line 199) | class SuperPixel(tf.keras.layers.Layer): method __init__ (line 202) | def __init__(self, block_args, global_params, name=None): method call (line 220) | def call(self, inputs, training): class MBConvBlock (line 224) | class MBConvBlock(tf.keras.layers.Layer): method __init__ (line 231) | def __init__(self, block_args, global_params, name=None): method block_args (line 267) | def block_args(self): method _build (line 270) | def _build(self): method call (line 361) | def call(self, inputs, training, survival_prob=None): class MBConvBlockWithoutDepthwise (line 420) | class MBConvBlockWithoutDepthwise(MBConvBlock): method _build (line 423) | def _build(self): method call (line 462) | def call(self, inputs, training, survival_prob=None): class Stem (line 507) | class Stem(tf.keras.layers.Layer): method __init__ (line 510) | def __init__(self, global_params, stem_filters, name=None): method call (line 527) | def call(self, inputs, training): class Head (line 531) | class Head(tf.keras.layers.Layer): method __init__ (line 534) | def __init__(self, global_params, name=None): method call (line 572) | def call(self, inputs, training, pooled_features_only): class Model (line 605) | class Model(tf.keras.Model): method __init__ (line 611) | def __init__(self, blocks_args=None, global_params=None, name=None): method _get_conv_block (line 636) | def _get_conv_block(self, conv_type): method _build (line 640) | def _build(self): method call (line 711) | def call(self, # pytype: disable=signature-mismatch # overriding-par... FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/preprocessing.py function distorted_bounding_box_crop (line 29) | def distorted_bounding_box_crop(image_bytes, function _at_least_x_are_equal (line 81) | def _at_least_x_are_equal(a, b, x): function _resize_image (line 88) | def _resize_image(image, image_size, method=None): function _decode_and_random_crop (line 96) | def _decode_and_random_crop(image_bytes, image_size, resize_method=None): function _decode_and_center_crop (line 118) | def _decode_and_center_crop(image_bytes, image_size, resize_method=None): function _flip (line 138) | def _flip(image): function preprocess_for_train (line 144) | def preprocess_for_train(image_bytes, function preprocess_for_eval (line 204) | def preprocess_for_eval(image_bytes, function preprocess_image (line 226) | def preprocess_image(image_bytes, FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/backbone/train_backbone.py function create_dataset (line 81) | def create_dataset(dataset: tf.data.Dataset, num_classes: int, class TrainableModel (line 109) | class TrainableModel(efficientnet_model.Model): method __init__ (line 115) | def __init__(self, method _reg_l2_loss (line 125) | def _reg_l2_loss(self, weight_decay, regex=r'.*(kernel|weight):0$'): method train_step (line 134) | def train_step(self, data): method test_step (line 148) | def test_step(self, data): function main (line 161) | def main(_) -> None: FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/coco_metric.py function block_print (line 39) | def block_print(log_level): function enable_print (line 45) | def enable_print(original_stdout): class EvaluationMetric (line 50) | class EvaluationMetric(): method __init__ (line 56) | def __init__(self, filename=None, testdev_dir=None, label_map=None): method reset_states (line 79) | def reset_states(self): method evaluate (line 92) | def evaluate(self, log_level=tf.compat.v1.logging.INFO): method result (line 171) | def result(self, log_level=tf.compat.v1.logging.INFO): method update_state (line 177) | def update_state(self, groundtruth_data, detections): method estimator_metric_fn (line 239) | def estimator_metric_fn(self, detections, groundtruth_data): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataloader.py class InputProcessor (line 25) | class InputProcessor: method __init__ (line 28) | def __init__(self, image, output_size): method image (line 52) | def image(self): method image (line 56) | def image(self, image): method normalize_image (line 59) | def normalize_image(self, mean_rgb, stddev_rgb): method set_training_random_scale_factors (line 67) | def set_training_random_scale_factors(self, method set_scale_factors_to_output_size (line 115) | def set_scale_factors_to_output_size(self): method resize_and_crop_image (line 129) | def resize_and_crop_image(self, method=tf.image.ResizeMethod.BILINEAR): class DetectionInputProcessor (line 145) | class DetectionInputProcessor(InputProcessor): method __init__ (line 148) | def __init__(self, image, output_size, boxes=None, classes=None): method random_horizontal_flip (line 153) | def random_horizontal_flip(self): method clip_boxes (line 158) | def clip_boxes(self, boxes): method resize_and_crop_boxes (line 168) | def resize_and_crop_boxes(self): method image_scale (line 194) | def image_scale(self): method image_scale_to_original (line 199) | def image_scale_to_original(self): method offset_x (line 204) | def offset_x(self): method offset_y (line 208) | def offset_y(self): function pad_to_fixed_size (line 212) | def pad_to_fixed_size(data, pad_value, output_shape): class InputReader (line 236) | class InputReader: method __init__ (line 239) | def __init__(self, method dataset_parser (line 253) | def dataset_parser(self, value, example_decoder, anchor_labeler, params): method process_example (line 365) | def process_example(self, params, batch_size, images, cls_targets, method dataset_options (line 397) | def dataset_options(self): method __call__ (line 404) | def __call__(self, params, input_context=None, batch_size=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/create_coco_tfrecord.py function create_tf_example (line 66) | def create_tf_example(image, function _pool_create_tf_example (line 201) | def _pool_create_tf_example(args): function _load_object_annotations (line 205) | def _load_object_annotations(object_annotations_file): function _load_caption_annotations (line 231) | def _load_caption_annotations(caption_annotations_file): function _load_images_info (line 254) | def _load_images_info(image_info_file): function _create_tf_record_from_coco_annotations (line 260) | def _create_tf_record_from_coco_annotations(image_info_file, function main (line 338) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/create_pascal_tfrecord.py function define_flags (line 66) | def define_flags(): class UniqueId (line 84) | class UniqueId(object): method __init__ (line 87) | def __init__(self): method get_image_id (line 91) | def get_image_id(self): method get_ann_id (line 95) | def get_ann_id(self): function dict_to_tf_example (line 100) | def dict_to_tf_example(data, function main (line 244) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/inspect_tfrecords.py class RecordInspect (line 44) | class RecordInspect: method __init__ (line 47) | def __init__(self, config): method visualize (line 65) | def visualize(self): function main (line 115) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/label_map_util.py function _validate_label_map (line 20) | def _validate_label_map(label_map): function create_category_index (line 37) | def create_category_index(categories): function get_max_label_map_index (line 56) | def get_max_label_map_index(label_map): function convert_label_map_to_categories (line 68) | def convert_label_map_to_categories(label_map, function create_class_agnostic_category_index (line 133) | def create_class_agnostic_category_index(): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/tfrecord_util.py function int64_feature (line 20) | def int64_feature(value): function int64_list_feature (line 24) | def int64_list_feature(value): function bytes_feature (line 28) | def bytes_feature(value): function bytes_list_feature (line 32) | def bytes_list_feature(value): function float_list_feature (line 36) | def float_list_feature(value): function read_examples_list (line 40) | def read_examples_list(path): function recursive_parse_xml_to_dict (line 62) | def recursive_parse_xml_to_dict(xml): function open_sharded_output_tfrecords (line 88) | def open_sharded_output_tfrecords(exit_stack, base_path, num_shards): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/det_model_fn.py function update_learning_rate_schedule_parameters (line 34) | def update_learning_rate_schedule_parameters(params): function stepwise_lr_schedule (line 58) | def stepwise_lr_schedule(adjusted_learning_rate, adjusted_lr_warmup_init, function cosine_lr_schedule (line 79) | def cosine_lr_schedule(adjusted_lr, adjusted_lr_warmup_init, lr_warmup_s... function polynomial_lr_schedule (line 93) | def polynomial_lr_schedule(adjusted_lr, adjusted_lr_warmup_init, lr_warm... function learning_rate_schedule (line 105) | def learning_rate_schedule(params, global_step): function focal_loss (line 134) | def focal_loss(y_pred, y_true, alpha, gamma, normalizer, label_smoothing... function _box_loss (line 173) | def _box_loss(box_outputs, box_targets, num_positives, delta=0.1): function detection_loss (line 190) | def detection_loss(cls_outputs, box_outputs, labels, params): function reg_l2_loss (line 290) | def reg_l2_loss(weight_decay, regex=r'.*(kernel|weight):0$'): function _model_fn (line 301) | def _model_fn(features, labels, mode, params, model, variable_filter_fn=... function efficientdet_model_fn (line 609) | def efficientdet_model_fn(features, labels, mode, params): function get_model_arch (line 622) | def get_model_arch(model_name='efficientdet-d0'): function get_model_fn (line 630) | def get_model_fn(model_name='efficientdet-d0'): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/efficientdet_arch.py function freeze_vars (line 36) | def freeze_vars(variables, pattern): function resample_feature_map (line 55) | def resample_feature_map(feat, function class_net (line 138) | def class_net(images, function box_net (line 196) | def box_net(images, function build_class_and_box_outputs (line 254) | def build_class_and_box_outputs(feats, config): function build_backbone (line 307) | def build_backbone(features, config): function build_feature_network (line 355) | def build_feature_network(features, config): function fuse_features (line 422) | def fuse_features(nodes, weight_method): function build_bifpn_layer (line 488) | def build_bifpn_layer(feats, feat_sizes, config): function efficientdet (line 559) | def efficientdet(features, model_name=None, config=None, **kwargs): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/hparams_config.py function eval_str_fn (line 25) | def eval_str_fn(val): class Config (line 35) | class Config(object): method __init__ (line 38) | def __init__(self, config_dict=None): method __setattr__ (line 41) | def __setattr__(self, k, v): method __getattr__ (line 44) | def __getattr__(self, k): method __getitem__ (line 47) | def __getitem__(self, k): method __repr__ (line 50) | def __repr__(self): method __deepcopy__ (line 53) | def __deepcopy__(self, memodict): method __str__ (line 56) | def __str__(self): method _update (line 62) | def _update(self, config_dict, allow_new_keys=True): method get (line 81) | def get(self, k, default_value=None): method update (line 84) | def update(self, config_dict): method keys (line 88) | def keys(self): method override (line 91) | def override(self, config_dict_or_str, allow_new_keys=False): method parse_from_yaml (line 111) | def parse_from_yaml(self, yaml_file_path: Text) -> Dict[Any, Any]: method save_to_yaml (line 117) | def save_to_yaml(self, yaml_file_path): method parse_from_str (line 122) | def parse_from_str(self, config_str: Text) -> Dict[Any, Any]: method as_dict (line 158) | def as_dict(self): function default_detection_configs (line 170) | def default_detection_configs(): function get_efficientdet_config (line 472) | def get_efficientdet_config(model_name='efficientdet-d1'): function get_detection_config (line 485) | def get_detection_config(model_name): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/inference.py function image_preprocess (line 37) | def image_preprocess(image, image_size, mean_rgb, stddev_rgb): function batch_image_files_decode (line 60) | def batch_image_files_decode(image_files): function batch_image_preprocess (line 69) | def batch_image_preprocess(raw_images, function build_inputs (line 113) | def build_inputs( function build_model (line 148) | def build_model(model_name: Text, inputs: tf.Tensor, **kwargs): function restore_ckpt (line 195) | def restore_ckpt(sess, ckpt_path, ema_decay=0.9998, export_ckpt=None): function det_post_process (line 234) | def det_post_process(params: Dict[Any, Any], cls_outputs: Dict[int, tf.T... function visualize_image (line 275) | def visualize_image(image, function visualize_image_prediction (line 317) | def visualize_image_prediction(image, class ServingDriver (line 341) | class ServingDriver(object): method __init__ (line 390) | def __init__(self, method __del__ (line 430) | def __del__(self): method _build_session (line 434) | def _build_session(self): method build (line 441) | def build(self, params_override=None): method visualize (line 477) | def visualize(self, image, prediction, **kwargs): method serve_files (line 485) | def serve_files(self, image_files: List[Text]): method benchmark (line 501) | def benchmark(self, image_arrays, trace_filename=None): method serve_images (line 540) | def serve_images(self, image_arrays): method load (line 557) | def load(self, saved_model_dir_or_frozen_graph: Text): method freeze (line 578) | def freeze(self): method export (line 585) | def export(self, class InferenceDriver (line 648) | class InferenceDriver(object): method __init__ (line 658) | def __init__(self, method inference (line 677) | def inference(self, image_path_pattern: Text, output_dir: Text, **kwar... FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/iou_utils.py function _get_v (line 27) | def _get_v(b1_height: FloatType, b1_width: FloatType, b2_height: FloatType, function _iou_per_anchor (line 57) | def _iou_per_anchor(pred_boxes: FloatType, function iou_loss (line 136) | def iou_loss(pred_boxes: FloatType, FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/anchors.py function decode_box_outputs (line 30) | def decode_box_outputs(pred_boxes, anchor_boxes): function decode_anchors_to_centersize (line 61) | def decode_anchors_to_centersize(pred_boxes, anchor_boxes): class Anchors (line 83) | class Anchors(): method __init__ (line 86) | def __init__(self, min_level, max_level, num_scales, aspect_ratios, method _generate_configs (line 117) | def _generate_configs(self): method _generate_boxes (line 132) | def _generate_boxes(self): method get_anchors_per_location (line 167) | def get_anchors_per_location(self): class AnchorLabeler (line 171) | class AnchorLabeler(object): method __init__ (line 174) | def __init__(self, anchors, num_classes, match_threshold=0.5): method _unpack_labels (line 197) | def _unpack_labels(self, labels): method label_anchors (line 213) | def label_anchors(self, gt_boxes, gt_labels): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/efficientdet_keras.py function add_n (line 32) | def add_n(nodes): class FNode (line 43) | class FNode(tf.keras.layers.Layer): method __init__ (line 46) | def __init__(self, method fuse_features (line 78) | def fuse_features(self, nodes): method _add_wsm (line 126) | def _add_wsm(self, initializer, shape=None): method build (line 132) | def build(self, feats_shape): method call (line 169) | def call(self, feats, training): class OpAfterCombine (line 180) | class OpAfterCombine(tf.keras.layers.Layer): method __init__ (line 183) | def __init__(self, method call (line 224) | def call(self, new_node, training): class ResampleFeatureMap (line 234) | class ResampleFeatureMap(tf.keras.layers.Layer): method __init__ (line 237) | def __init__(self, method _pool2d (line 274) | def _pool2d(self, inputs, height, width, target_height, target_width): method _upsample2d (line 292) | def _upsample2d(self, inputs, target_height, target_width, training=Fa... method _maybe_apply_1x1 (line 298) | def _maybe_apply_1x1(self, feat, training, num_channels): method call (line 306) | def call(self, feat, training, all_feats): class ClassNet (line 336) | class ClassNet(tf.keras.layers.Layer): method __init__ (line 339) | def __init__(self, method _conv_bn_act (line 423) | def _conv_bn_act(self, image, i, level_id, training): method call (line 442) | def call(self, inputs, training, **kwargs): method conv2d_layer (line 457) | def conv2d_layer(cls, separable_conv, data_format): method classes_layer (line 474) | def classes_layer(cls, conv2d_layer, num_classes, num_anchors, name): class BoxNet (line 484) | class BoxNet(tf.keras.layers.Layer): method __init__ (line 487) | def __init__(self, method _conv_bn_act (line 585) | def _conv_bn_act(self, image, i, level_id, training): method call (line 604) | def call(self, inputs, training): method boxes_layer (line 620) | def boxes_layer(cls, separable_conv, num_anchors, data_format, name): class SegmentationHead (line 646) | class SegmentationHead(tf.keras.layers.Layer): method __init__ (line 649) | def __init__(self, method call (line 696) | def call(self, feats, training): class FPNCells (line 711) | class FPNCells(tf.keras.layers.Layer): method __init__ (line 714) | def __init__(self, config, name='fpn_cells'): method call (line 731) | def call(self, feats, training): class FPNCell (line 747) | class FPNCell(tf.keras.layers.Layer): method __init__ (line 750) | def __init__(self, config, name='fpn_cell'): method call (line 780) | def call(self, feats, training): class EfficientDetNet (line 789) | class EfficientDetNet(tf.keras.Model): method __init__ (line 792) | def __init__(self, method _init_set_name (line 889) | def _init_set_name(self, name, zero_based=True): method call (line 896) | def call(self, inputs, training): class EfficientDetModel (line 936) | class EfficientDetModel(EfficientDetNet): method _preprocessing (line 939) | def _preprocessing(self, method _postprocess (line 971) | def _postprocess(self, cls_outputs, box_outputs, scales, mode='global'): method call (line 993) | def call(self, inputs, training=False, pre_mode='infer', post_mode='gl... FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/eval.py function main (line 48) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/eval_tflite.py function define_flags (line 36) | def define_flags(): class LiteRunner (line 55) | class LiteRunner(object): method __init__ (line 58) | def __init__(self, tflite_model_path, only_network=False): method run (line 80) | def run(self, image): function main (line 128) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/fpn_configs.py function bifpn_config (line 24) | def bifpn_config(min_level, max_level, weight_method): function qufpn_config (line 75) | def qufpn_config(min_level, max_level, weight_method=None): function get_fpn_config (line 166) | def get_fpn_config(fpn_name, min_level, max_level, weight_method): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/infer.py function main (line 38) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/infer_lib.py function visualize_image (line 33) | def visualize_image(image, class ExportNetwork (line 75) | class ExportNetwork(tf.Module): method __init__ (line 77) | def __init__(self, model): method __call__ (line 82) | def __call__(self, imgs): class ExportModel (line 86) | class ExportModel(tf.Module): method __init__ (line 89) | def __init__(self, model, pre_mode='infer', post_mode='global'): method __call__ (line 96) | def __call__(self, imgs): class ServingDriver (line 101) | class ServingDriver: method __init__ (line 150) | def __init__(self, method model (line 190) | def model(self): method model (line 196) | def model(self, model): method build (line 199) | def build(self, params_override=None): method visualize (line 218) | def visualize(self, image, boxes, classes, scores, **kwargs): method benchmark (line 223) | def benchmark(self, image_arrays, bm_runs=10, trace_filename=None): method serve (line 255) | def serve(self, image_arrays): method load (line 273) | def load(self, saved_model_dir_or_frozen_graph: Text): method freeze (line 304) | def freeze(self, func): method _get_model_and_spec (line 312) | def _get_model_and_spec(self, tflite=None): method export (line 337) | def export(self, FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/inspector.py function main (line 69) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/label_util.py function get_label_map (line 136) | def get_label_map(mapping): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/postprocess.py function to_list (line 35) | def to_list(inputs): function batch_map_fn (line 42) | def batch_map_fn(map_fn, inputs, *args): function clip_boxes (line 59) | def clip_boxes(boxes: T, image_size: int) -> T: function merge_class_box_level_outputs (line 65) | def merge_class_box_level_outputs(params, cls_outputs: List[T], function topk_class_boxes (line 80) | def topk_class_boxes(params, cls_outputs: T, function pre_nms (line 117) | def pre_nms(params, cls_outputs, box_outputs, topk=True): function nms (line 157) | def nms(params, boxes: T, scores: T, classes: T, function postprocess_combined (line 206) | def postprocess_combined(params, cls_outputs, box_outputs, image_scales=... function tflite_nms_implements_signature (line 246) | def tflite_nms_implements_signature(params): function tflite_pre_nms (line 286) | def tflite_pre_nms(params, cls_outputs, box_outputs): function postprocess_tflite (line 331) | def postprocess_tflite(params, cls_outputs, box_outputs): function postprocess_global (line 373) | def postprocess_global(params, cls_outputs, box_outputs, image_scales=No... function per_class_nms (line 407) | def per_class_nms(params, boxes, scores, classes, image_scales=None): function postprocess_per_class (line 468) | def postprocess_per_class(params, cls_outputs, box_outputs, image_scales... function generate_detections_from_nms_output (line 492) | def generate_detections_from_nms_output(nms_boxes_bs, function generate_detections (line 528) | def generate_detections(params, function transform_detections (line 587) | def transform_detections(detections): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/segmentation.py function create_mask (line 25) | def create_mask(pred_mask): function normalize (line 31) | def normalize(input_image, input_mask): function load_image_train (line 37) | def load_image_train(datapoint): function load_image_test (line 51) | def load_image_test(datapoint): function main (line 60) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/tfmot.py function quantize (line 23) | def quantize(layer, quantize_config=None): function set_config (line 37) | def set_config(configs): function get_method (line 46) | def get_method(method): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/train.py function define_flags (line 33) | def define_flags(): function setup_model (line 111) | def setup_model(model, config): function init_experimental (line 144) | def init_experimental(config): function main (line 152) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/train_lib.py function _collect_prunable_layers (line 39) | def _collect_prunable_layers(model): class UpdatePruningStep (line 52) | class UpdatePruningStep(tf.keras.callbacks.Callback): method __init__ (line 64) | def __init__(self): method on_train_begin (line 68) | def on_train_begin(self, logs=None): method on_train_batch_begin (line 73) | def on_train_batch_begin(self, batch, logs=None): method on_epoch_end (line 83) | def on_epoch_end(self, batch, logs=None): class PruningSummaries (line 98) | class PruningSummaries(tf.keras.callbacks.TensorBoard): method __init__ (line 104) | def __init__(self, log_dir, update_freq='epoch', **kwargs): method _log_pruning_metrics (line 115) | def _log_pruning_metrics(self, logs, step): method on_epoch_begin (line 122) | def on_epoch_begin(self, epoch, logs=None): function update_learning_rate_schedule_parameters (line 152) | def update_learning_rate_schedule_parameters(params): class StepwiseLrSchedule (line 166) | class StepwiseLrSchedule(tf.optimizers.schedules.LearningRateSchedule): method __init__ (line 169) | def __init__(self, adjusted_lr: float, lr_warmup_init: float, method __call__ (line 189) | def __call__(self, step): class CosineLrSchedule (line 204) | class CosineLrSchedule(tf.optimizers.schedules.LearningRateSchedule): method __init__ (line 207) | def __init__(self, adjusted_lr: float, lr_warmup_init: float, method __call__ (line 224) | def __call__(self, step): class PolynomialLrSchedule (line 234) | class PolynomialLrSchedule(tf.optimizers.schedules.LearningRateSchedule): method __init__ (line 237) | def __init__(self, adjusted_lr: float, lr_warmup_init: float, method __call__ (line 256) | def __call__(self, step): function learning_rate_schedule (line 266) | def learning_rate_schedule(params): function get_optimizer (line 291) | def get_optimizer(params): class COCOCallback (line 318) | class COCOCallback(tf.keras.callbacks.Callback): method __init__ (line 321) | def __init__(self, test_dataset, update_freq=None): method set_model (line 326) | def set_model(self, model: tf.keras.Model): method _get_detections (line 337) | def _get_detections(self, images, labels): method on_epoch_end (line 348) | def on_epoch_end(self, epoch, logs=None): class DisplayCallback (line 367) | class DisplayCallback(tf.keras.callbacks.Callback): method __init__ (line 370) | def __init__(self, sample_image, output_dir, update_freq=None): method set_model (line 378) | def set_model(self, model: tf.keras.Model): method on_train_batch_end (line 386) | def on_train_batch_end(self, batch, logs=None): method _draw_inference (line 390) | def _draw_inference(self, step): function get_callbacks (line 409) | def get_callbacks(params, val_dataset=None): class AdversarialLoss (line 451) | class AdversarialLoss(tf.keras.losses.Loss): method __init__ (line 455) | def __init__(self, adv_config, *args, **kwargs): method build (line 463) | def build(self, model, loss_fn, tape): method call (line 469) | def call(self, features, y, y_pred, labeled_loss): class FocalLoss (line 480) | class FocalLoss(tf.keras.losses.Loss): method __init__ (line 487) | def __init__(self, alpha, gamma, label_smoothing=0.0, **kwargs): method call (line 503) | def call(self, y, y_pred): class BoxLoss (line 532) | class BoxLoss(tf.keras.losses.Loss): method __init__ (line 535) | def __init__(self, delta=0.1, **kwargs): method call (line 550) | def call(self, y_true, box_outputs): class BoxIouLoss (line 563) | class BoxIouLoss(tf.keras.losses.Loss): method __init__ (line 566) | def __init__(self, iou_loss_type, min_level, max_level, num_scales, method call (line 575) | def call(self, y_true, box_outputs): class EfficientDetNetTrain (line 590) | class EfficientDetNetTrain(efficientdet_keras.EfficientDetNet): method __init__ (line 596) | def __init__(self, *args, **kwargs): method _freeze_vars (line 601) | def _freeze_vars(self): method _reg_l2_loss (line 609) | def _reg_l2_loss(self, weight_decay, regex=r'.*(kernel|weight):0$'): method _detection_loss (line 616) | def _detection_loss(self, cls_outputs, box_outputs, labels, loss_vals): method train_step (line 729) | def train_step(self, data): method test_step (line 810) | def test_step(self, data): class EfficientDetNetTrainHub (line 859) | class EfficientDetNetTrainHub(EfficientDetNetTrain): method __init__ (line 862) | def __init__(self, config, hub_module_url, name=''): method call (line 888) | def call(self, inputs, training): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/util_keras.py function build_batch_norm (line 29) | def build_batch_norm(is_training_bn: bool, function get_ema_vars (line 69) | def get_ema_vars(model): function average_name (line 83) | def average_name(ema, var): function load_from_hub_checkpoint (line 103) | def load_from_hub_checkpoint(model, ckpt_path_or_file): function restore_ckpt (line 128) | def restore_ckpt(model, function fp16_to_fp32_nested (line 215) | def fp16_to_fp32_nested(input_nested): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/wbf.py function vectorized_iou (line 19) | def vectorized_iou(clusters, detection): function find_matching_cluster (line 39) | def find_matching_cluster(clusters, detection): function weighted_average (line 51) | def weighted_average(samples, weights): function average_detections (line 55) | def average_detections(detections, num_models): function ensemble_detections (line 70) | def ensemble_detections(params, detections, num_models): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/main.py function main (line 123) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/model_inspect.py class ModelInspector (line 75) | class ModelInspector(object): method __init__ (line 78) | def __init__(self, method build_model (line 124) | def build_model(self, inputs: tf.Tensor) -> List[tf.Tensor]: method export_saved_model (line 140) | def export_saved_model(self, **kwargs): method saved_model_inference (line 153) | def saved_model_inference(self, image_path_pattern, output_dir, **kwar... method saved_model_benchmark (line 191) | def saved_model_benchmark(self, method saved_model_video (line 211) | def saved_model_video(self, video_path: Text, output_video: Text, **kw... method inference_single_image (line 254) | def inference_single_image(self, image_image_path, output_dir, **kwargs): method build_and_save_model (line 259) | def build_and_save_model(self): method eval_ckpt (line 288) | def eval_ckpt(self): method freeze_model (line 298) | def freeze_model(self) -> Tuple[Text, Text]: method benchmark_model (line 348) | def benchmark_model(self, method convert_tr (line 428) | def convert_tr(self, graph_def, fetches): method run_model (line 439) | def run_model(self, runmode, **kwargs): function main (line 482) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/nms_np.py function diou_nms (line 28) | def diou_nms(dets, iou_thresh=None): function hard_nms (line 89) | def hard_nms(dets, iou_thresh=None): function soft_nms (line 129) | def soft_nms(dets, nms_configs): function nms (line 194) | def nms(dets, nms_configs): function per_class_nms (line 220) | def per_class_nms(boxes, scores, classes, image_id, image_scale, num_cla... FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/argmax_matcher.py class ArgMaxMatcher (line 34) | class ArgMaxMatcher(matcher.Matcher): method __init__ (line 53) | def __init__(self, method _match (line 101) | def _match(self, similarity_matrix): method _set_values_using_indicator (line 186) | def _set_values_using_indicator(self, x, indicator, val): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/box_coder.py class BoxCoder (line 42) | class BoxCoder(object): method code_size (line 47) | def code_size(self): method encode (line 60) | def encode(self, boxes, anchors): method decode (line 73) | def decode(self, rel_codes, anchors): method _encode (line 88) | def _encode(self, boxes, anchors): method _decode (line 101) | def _decode(self, rel_codes, anchors): function batch_decode (line 115) | def batch_decode(encoded_boxes, box_coder, anchors): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/box_list.py class BoxList (line 39) | class BoxList(object): method __init__ (line 42) | def __init__(self, boxes): method num_boxes (line 58) | def num_boxes(self): method num_boxes_static (line 66) | def num_boxes_static(self): method get_all_fields (line 77) | def get_all_fields(self): method get_extra_fields (line 81) | def get_extra_fields(self): method add_field (line 85) | def add_field(self, field, field_data): method has_field (line 97) | def has_field(self, field): method get (line 100) | def get(self): method set (line 108) | def set(self, boxes): method get_field (line 121) | def get_field(self, field): method set_field (line 141) | def set_field(self, field, value): method get_center_coordinates_and_sizes (line 157) | def get_center_coordinates_and_sizes(self, scope=None): method transpose_coordinates (line 175) | def transpose_coordinates(self, scope=None): method as_tensor_dict (line 186) | def as_tensor_dict(self, fields=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/faster_rcnn_box_coder.py class FasterRcnnBoxCoder (line 38) | class FasterRcnnBoxCoder(box_coder.BoxCoder): method __init__ (line 41) | def __init__(self, scale_factors=None): method code_size (line 56) | def code_size(self): method _encode (line 59) | def _encode(self, boxes, anchors): method _decode (line 91) | def _decode(self, rel_codes, anchors): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/matcher.py class Match (line 37) | class Match(object): method __init__ (line 44) | def __init__(self, match_results): method match_results (line 65) | def match_results(self): method matched_column_indices (line 73) | def matched_column_indices(self): method matched_column_indicator (line 83) | def matched_column_indicator(self): method num_matched_columns (line 91) | def num_matched_columns(self): method unmatched_column_indices (line 95) | def unmatched_column_indices(self): method unmatched_column_indicator (line 105) | def unmatched_column_indicator(self): method num_unmatched_columns (line 113) | def num_unmatched_columns(self): method ignored_column_indices (line 117) | def ignored_column_indices(self): method ignored_column_indicator (line 127) | def ignored_column_indicator(self): method num_ignored_columns (line 136) | def num_ignored_columns(self): method unmatched_or_ignored_column_indices (line 140) | def unmatched_or_ignored_column_indices(self): method matched_row_indices (line 150) | def matched_row_indices(self): method _reshape_and_cast (line 165) | def _reshape_and_cast(self, t): method gather_based_on_match (line 168) | def gather_based_on_match(self, input_tensor, unmatched_value, class Matcher (line 197) | class Matcher(object): method match (line 202) | def match(self, similarity_matrix, scope=None, **params): method _match (line 222) | def _match(self, similarity_matrix, **params): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/preprocessor.py function _flip_boxes_left_right (line 47) | def _flip_boxes_left_right(boxes): function _flip_masks_left_right (line 66) | def _flip_masks_left_right(masks): function keypoint_flip_horizontal (line 80) | def keypoint_flip_horizontal(keypoints, flip_point, flip_permutation, function random_horizontal_flip (line 113) | def random_horizontal_flip(image, function _compute_new_static_size (line 200) | def _compute_new_static_size(image, min_dimension, max_dimension): function _compute_new_dynamic_size (line 236) | def _compute_new_dynamic_size(image, min_dimension, max_dimension): function resize_to_range (line 274) | def resize_to_range(image, function _copy_extra_fields (line 354) | def _copy_extra_fields(boxlist_to_copy_to, boxlist_to_copy_from): function box_list_scale (line 369) | def box_list_scale(boxlist, y_scale, x_scale, scope=None): function keypoint_scale (line 395) | def keypoint_scale(keypoints, y_scale, x_scale, scope=None): function scale_boxes_to_pixel_coordinates (line 414) | def scale_boxes_to_pixel_coordinates(image, boxes, keypoints=None): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/region_similarity_calculator.py function area (line 26) | def area(boxlist, scope=None): function intersection (line 42) | def intersection(boxlist1, boxlist2, scope=None): function iou (line 67) | def iou(boxlist1, boxlist2, scope=None): class RegionSimilarityCalculator (line 89) | class RegionSimilarityCalculator(object): method compare (line 93) | def compare(self, boxlist1, boxlist2, scope=None): method _compare (line 114) | def _compare(self, boxlist1, boxlist2): class IouSimilarity (line 118) | class IouSimilarity(RegionSimilarityCalculator): method _compare (line 124) | def _compare(self, boxlist1, boxlist2): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/shape_utils.py function assert_shape_equal (line 20) | def assert_shape_equal(shape_a, shape_b): function combined_static_and_dynamic_shape (line 49) | def combined_static_and_dynamic_shape(tensor): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/target_assigner.py class TargetAssigner (line 42) | class TargetAssigner(object): method __init__ (line 45) | def __init__(self, similarity_calc, matcher, box_coder, method box_coder (line 77) | def box_coder(self): method assign (line 80) | def assign(self, anchors, groundtruth_boxes, groundtruth_labels=None, method _reset_target_shape (line 168) | def _reset_target_shape(self, target, num_anchors): method _create_regression_targets (line 184) | def _create_regression_targets(self, anchors, groundtruth_boxes, match): method _default_regression_target (line 220) | def _default_regression_target(self): method _create_classification_targets (line 233) | def _create_classification_targets(self, groundtruth_labels, match): method _create_regression_weights (line 257) | def _create_regression_weights(self, match, groundtruth_weights): method _create_classification_weights (line 276) | def _create_classification_weights(self, method get_box_coder (line 303) | def get_box_coder(self): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/object_detection/tf_example_decoder.py function _get_source_id_from_encoded_image (line 24) | def _get_source_id_from_encoded_image(parsed_tensors): class TfExampleDecoder (line 30) | class TfExampleDecoder(object): method __init__ (line 33) | def __init__(self, include_mask=False, regenerate_source_id=False): method _decode_image (line 55) | def _decode_image(self, parsed_tensors): method _decode_boxes (line 61) | def _decode_boxes(self, parsed_tensors): method _decode_masks (line 69) | def _decode_masks(self, parsed_tensors): method _decode_areas (line 86) | def _decode_areas(self, parsed_tensors): method decode (line 96) | def decode(self, serialized_example): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/run_tflite.py function define_flags (line 27) | def define_flags(): function load_image (line 35) | def load_image(image_path, image_size): function save_visualized_image (line 52) | def save_visualized_image(image, prediction, output_path): class TFLiteRunner (line 67) | class TFLiteRunner: method __init__ (line 70) | def __init__(self, model_path): method run (line 81) | def run(self, image): function main (line 95) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/tensorrt.py function convert2trt (line 38) | def convert2trt(tf_savedmodel_dir: str, trt_savedmodel_dir: str): function benchmark (line 48) | def benchmark(trt_savedmodel_dir: str, warmup_runs: int = 5, bm_runs: in... function main (line 75) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/utils.py function srelu_fn (line 36) | def srelu_fn(x): function activation_fn (line 45) | def activation_fn(features: tf.Tensor, act_type: Text): function cross_replica_mean (line 65) | def cross_replica_mean(t, num_shards_per_group=None): function get_ema_vars (line 87) | def get_ema_vars(): function get_ckpt_var_map (line 99) | def get_ckpt_var_map(ckpt_path, ckpt_scope, var_scope, skip_mismatch=None): class TpuBatchNormalization (line 175) | class TpuBatchNormalization(tf.keras.layers.BatchNormalization): method __init__ (line 178) | def __init__(self, fused=False, **kwargs): method _moments (line 185) | def _moments(self, inputs, reduction_axes, keep_dims, mask=None): method call (line 206) | def call(self, inputs, mask=None, training=None): class SyncBatchNormalization (line 214) | class SyncBatchNormalization(tf.keras.layers.BatchNormalization): method __init__ (line 217) | def __init__(self, fused=False, **kwargs): method _moments (line 224) | def _moments(self, inputs, reduction_axes, keep_dims, mask=None): method call (line 245) | def call(self, inputs, mask=None, training=None): class BatchNormalization (line 253) | class BatchNormalization(tf.keras.layers.BatchNormalization): method __init__ (line 256) | def __init__(self, **kwargs): method call (line 261) | def call(self, inputs, mask=None, training=None): function batch_norm_class (line 269) | def batch_norm_class(is_training, strategy=None): function batch_normalization (line 282) | def batch_normalization(inputs, function batch_norm_act (line 318) | def batch_norm_act(inputs, function drop_connect (line 376) | def drop_connect(inputs, is_training, survival_prob): function num_params_flops (line 394) | def num_params_flops(readable_format=True): class Pair (line 414) | class Pair(tuple): method __new__ (line 416) | def __new__(cls, name, value): method __init__ (line 419) | def __init__(self, name, _): # pylint: disable=super-init-not-called function scalar (line 423) | def scalar(name, tensor, is_tpu=True): function image (line 432) | def image(name, tensor, is_tpu=True): function get_tpu_host_call (line 440) | def get_tpu_host_call(global_step, params): function archive_ckpt (line 481) | def archive_ckpt(ckpt_eval, ckpt_objective, ckpt_path): function parse_image_size (line 531) | def parse_image_size(image_size: Union[Text, int, Tuple[int, int]]): function get_feat_sizes (line 556) | def get_feat_sizes(image_size: Union[Text, int, Tuple[int, int]], function verify_feats_size (line 576) | def verify_feats_size(feats, function get_precision (line 599) | def get_precision(strategy: str, mixed_precision: bool = False): function float16_scope (line 617) | def float16_scope(): function set_precision_policy (line 636) | def set_precision_policy(policy_name: Text = None): function build_model_with_precision (line 655) | def build_model_with_precision(pp, mm, ii, *args, **kwargs): function _recompute_grad (line 692) | def _recompute_grad(f): function recompute_grad (line 763) | def recompute_grad(recompute=False): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/visualize/shape_utils.py function _is_tensor (line 22) | def _is_tensor(t): function _set_dim_0 (line 34) | def _set_dim_0(t, d0): function pad_tensor (line 50) | def pad_tensor(t, length): function clip_tensor (line 76) | def clip_tensor(t, length): function pad_or_clip_tensor (line 95) | def pad_or_clip_tensor(t, length): function pad_or_clip_nd (line 111) | def pad_or_clip_nd(tensor, output_shape): function combined_static_and_dynamic_shape (line 153) | def combined_static_and_dynamic_shape(tensor): function static_or_dynamic_map_fn (line 176) | def static_or_dynamic_map_fn(fn, elems, dtype=None, function check_min_image_dim (line 249) | def check_min_image_dim(min_dim, image_tensor): function assert_shape_equal (line 288) | def assert_shape_equal(shape_a, shape_b): function assert_shape_equal_along_first_dimension (line 317) | def assert_shape_equal_along_first_dimension(shape_a, shape_b): function assert_box_normalized (line 346) | def assert_box_normalized(boxes, maximum_normalized_coordinate=1.1): function flatten_dimensions (line 369) | def flatten_dimensions(inputs, first, last): function flatten_first_n_dimensions (line 406) | def flatten_first_n_dimensions(inputs, n): function expand_first_dimension (line 427) | def expand_first_dimension(inputs, dims): function resize_images_and_return_shapes (line 461) | def resize_images_and_return_shapes(inputs, image_resizer_fn): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/visualize/standard_fields.py class InputDataFields (line 27) | class InputDataFields(object): class DetectionResultFields (line 114) | class DetectionResultFields(object): class BoxListFields (line 155) | class BoxListFields(object): class PredictionFields (line 183) | class PredictionFields(object): class TfExampleFields (line 199) | class TfExampleFields(object): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/visualize/static_shape.py function get_dim_as_int (line 21) | def get_dim_as_int(dim): function get_batch_size (line 36) | def get_batch_size(tensor_shape): function get_height (line 49) | def get_height(tensor_shape): function get_width (line 62) | def get_width(tensor_shape): function get_depth (line 75) | def get_depth(tensor_shape): FILE: tensorflow_examples/lite/model_maker/third_party/efficientdet/visualize/vis_utils.py function _force_matplotlib_backend (line 66) | def _force_matplotlib_backend(): function _get_multiplier_for_color_randomness (line 72) | def _get_multiplier_for_color_randomness(): function save_image_array_as_png (line 100) | def save_image_array_as_png(image, output_path): function encode_image_array_as_png_str (line 112) | def encode_image_array_as_png_str(image): function draw_bounding_box_on_image_array (line 129) | def draw_bounding_box_on_image_array(image, function draw_bounding_box_on_image (line 164) | def draw_bounding_box_on_image(image, function draw_bounding_boxes_on_image_array (line 239) | def draw_bounding_boxes_on_image_array(image, function draw_bounding_boxes_on_image (line 265) | def draw_bounding_boxes_on_image(image, function create_visualization_fn (line 298) | def create_visualization_fn(category_index, function _resize_original_image (line 393) | def _resize_original_image(image, image_shape): function draw_bounding_boxes_on_image_tensors (line 403) | def draw_bounding_boxes_on_image_tensors(images, function draw_side_by_side_evaluation_image (line 507) | def draw_side_by_side_evaluation_image(eval_dict, function draw_keypoints_on_image_array (line 651) | def draw_keypoints_on_image_array(image, function draw_keypoints_on_image (line 682) | def draw_keypoints_on_image(image, function draw_mask_on_image_array (line 731) | def draw_mask_on_image_array(image, mask, color='red', alpha=0.4): function visualize_boxes_and_labels_on_image_array (line 764) | def visualize_boxes_and_labels_on_image_array( function add_cdf_image_summary (line 921) | def add_cdf_image_summary(values, name): function add_hist_image_summary (line 957) | def add_hist_image_summary(values, bins, name): class EvalMetricOpsVisualization (line 988) | class EvalMetricOpsVisualization(six.with_metaclass(abc.ABCMeta, object)): method __init__ (line 998) | def __init__(self, method clear (line 1031) | def clear(self): method add_images (line 1034) | def add_images(self, images): method get_estimator_eval_metric_ops (line 1044) | def get_estimator_eval_metric_ops(self, eval_dict): method images_from_evaluation_dict (line 1120) | def images_from_evaluation_dict(self, eval_dict): class VisualizeSingleFrameDetections (line 1135) | class VisualizeSingleFrameDetections(EvalMetricOpsVisualization): method __init__ (line 1138) | def __init__(self, method images_from_evaluation_dict (line 1155) | def images_from_evaluation_dict(self, eval_dict): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/configs/model_config.py class ModelConfig (line 20) | class ModelConfig(object): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/data/example_generation_movielens.py function define_flags (line 62) | def define_flags(): class MovieInfo (line 82) | class MovieInfo( method __new__ (line 88) | def __new__(cls, function download_and_extract_data (line 98) | def download_and_extract_data(data_directory, function read_data (line 130) | def read_data(data_directory, min_rating=None): function convert_to_timelines (line 148) | def convert_to_timelines(ratings_df): function generate_movies_dict (line 163) | def generate_movies_dict(movies_df): function extract_year_from_title (line 173) | def extract_year_from_title(title): function generate_feature_of_movie_years (line 180) | def generate_feature_of_movie_years(movies_dict, movies): function generate_movie_genres (line 188) | def generate_movie_genres(movies_dict, movies): function _pad_or_truncate_movie_feature (line 213) | def _pad_or_truncate_movie_feature(feature, max_len, pad_value): function generate_examples_from_single_timeline (line 218) | def generate_examples_from_single_timeline(timeline, function generate_examples_from_timelines (line 278) | def generate_examples_from_timelines(timelines, function generate_movie_feature_vocabs (line 334) | def generate_movie_feature_vocabs(movies_df, movie_counts): function write_tfrecords (line 369) | def write_tfrecords(tf_examples, filename): function write_vocab_json (line 380) | def write_vocab_json(vocab, filename): function write_vocab_txt (line 386) | def write_vocab_txt(vocab, filename): function generate_datasets (line 392) | def generate_datasets(extracted_data_dir, function main (line 459) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/data/example_generation_movielens_test.py class ExampleGenerationMovielensTest (line 226) | class ExampleGenerationMovielensTest(tf.test.TestCase): method test_example_generation (line 228) | def test_example_generation(self): method test_vocabs_generation (line 244) | def test_vocabs_generation(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/context_encoder.py function safe_div (line 24) | def safe_div(x, y): class ContextEncoder (line 28) | class ContextEncoder(tf.keras.layers.Layer): method __init__ (line 39) | def __init__(self, method call (line 82) | def call(self, input_context: Dict[str, tf.Tensor]) -> tf.Tensor: class FeatureGroupEncoder (line 109) | class FeatureGroupEncoder(tf.keras.layers.Layer): method __init__ (line 118) | def __init__(self, method call (line 173) | def call(self, input_context: Dict[str, tf.Tensor]) -> tf.Tensor: FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/context_encoder_test.py class ContextEncoderTest (line 22) | class ContextEncoderTest(tf.test.TestCase): method _create_test_feature_group (line 24) | def _create_test_feature_group(self, method _create_test_input_config (line 39) | def _create_test_input_config(self): method _create_test_model_config (line 65) | def _create_test_model_config(self): method test_feature_group_encoder_bow (line 73) | def test_feature_group_encoder_bow(self): method test_feature_group_encoder_cnn (line 88) | def test_feature_group_encoder_cnn(self): method test_feature_group_encoder_lstm (line 103) | def test_feature_group_encoder_lstm(self): method test_context_encoder (line 118) | def test_context_encoder(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/dotproduct_similarity.py class DotProductSimilarity (line 20) | class DotProductSimilarity(tf.keras.layers.Layer): method call (line 27) | def call(self, FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/dotproduct_similarity_test.py class DotproductSimilarityTest (line 20) | class DotproductSimilarityTest(tf.test.TestCase): method test_dotproduct (line 22) | def test_dotproduct(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/input_pipeline.py class FeaturesAndVocabsByName (line 33) | class FeaturesAndVocabsByName( method __new__ (line 39) | def __new__(cls, features_by_name=None, vocabs_by_name=None): function _prepare_feature_vocab_table (line 45) | def _prepare_feature_vocab_table( function _get_features_vocabs_for_groups (line 82) | def _get_features_vocabs_for_groups( function get_features_and_vocabs_by_name (line 109) | def get_features_and_vocabs_by_name( function _get_feature_spec (line 145) | def _get_feature_spec(feature_type: input_config_pb2.FeatureType, function _get_serving_feature_spec (line 178) | def _get_serving_feature_spec(feature_name: str, function get_serving_input_specs (line 190) | def get_serving_input_specs( function decode_example (line 201) | def decode_example( function get_input_dataset (line 246) | def get_input_dataset(data_filepattern: str, FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/input_pipeline_test.py class InputPipelineTest (line 106) | class InputPipelineTest(tf.test.TestCase): method _AssertSparseTensorValueEqual (line 108) | def _AssertSparseTensorValueEqual(self, a, b): method setUp (line 113) | def setUp(self): method test_features_vocabs_gen (line 126) | def test_features_vocabs_gen(self): method test_decode_example (line 139) | def test_decode_example(self): method test_get_input_dataset (line 161) | def test_get_input_dataset(self): method test_get_serving_input_specs (line 173) | def test_get_serving_input_specs(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/label_encoder.py class LabelEncoder (line 23) | class LabelEncoder(tf.keras.layers.Layer): method __init__ (line 31) | def __init__(self, method label_name (line 56) | def label_name(self): method encode (line 59) | def encode(self, input_label: tf.Tensor) -> tf.Tensor: method call (line 76) | def call(self, inputs: Dict[str, tf.Tensor]): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/label_encoder_test.py class LabelEncoderTest (line 21) | class LabelEncoderTest(tf.test.TestCase): method _create_test_input_config (line 23) | def _create_test_input_config(self): method test_label_encoder (line 48) | def test_label_encoder(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/losses.py class BatchSoftmax (line 22) | class BatchSoftmax(tf.keras.losses.Loss): method __init__ (line 29) | def __init__(self, name='batch_softmax', **kwargs): method call (line 33) | def call(self, y_true: tf.Tensor, y_pred: tf.Tensor): class GlobalSoftmax (line 55) | class GlobalSoftmax(tf.keras.losses.Loss): method __init__ (line 63) | def __init__(self, name='global_softmax', **kwargs): method call (line 67) | def call(self, y_true: tf.Tensor, y_pred: tf.Tensor): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/losses_test.py class KerasLossesTest (line 23) | class KerasLossesTest(tf.test.TestCase): method test_batch_softmax_loss (line 25) | def test_batch_softmax_loss(self): method test_global_softmax_loss (line 37) | def test_global_softmax_loss(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/metrics.py function _get_batch_similarities (line 22) | def _get_batch_similarities(batch_label, full_vocab_similarities): class BatchRecall (line 27) | class BatchRecall(tf.keras.metrics.Recall): method __init__ (line 30) | def __init__(self, top_k=1, name='batch_recall'): method update_state (line 33) | def update_state(self, y_true, y_pred, sample_weight=None): class GlobalRecall (line 51) | class GlobalRecall(tf.keras.metrics.Recall): method __init__ (line 54) | def __init__(self, top_k=1, name='global_recall'): method update_state (line 57) | def update_state(self, y_true, y_pred, sample_weight=None): class BatchMeanRank (line 75) | class BatchMeanRank(tf.keras.metrics.Mean): method __init__ (line 78) | def __init__(self, name='batch_mean_rank', **kwargs): method update_state (line 81) | def update_state(self, y_true, y_pred, sample_weight=None): # pytype:... class GlobalMeanRank (line 107) | class GlobalMeanRank(tf.keras.metrics.Mean): method __init__ (line 110) | def __init__(self, name='global_mean_rank', **kwargs): method update_state (line 113) | def update_state(self, y_true, y_pred, sample_weight=None): # pytype:... FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/metrics_test.py class KerasMetricsTest (line 23) | class KerasMetricsTest(tf.test.TestCase): method test_batch_recall_and_mean_rank (line 25) | def test_batch_recall_and_mean_rank(self): method test_global_recall_and_mean_rank (line 39) | def test_global_recall_and_mean_rank(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/recommendation_model.py class RecommendationModel (line 24) | class RecommendationModel(tf.keras.Model): method __init__ (line 27) | def __init__(self, method call (line 49) | def call(self, inputs): # pytype: disable=signature-mismatch # overr... method serve (line 77) | def serve(self, **kwargs): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/recommendation_model_launcher.py function define_flags (line 35) | def define_flags(): class SimpleCheckpoint (line 77) | class SimpleCheckpoint(tf.keras.callbacks.Callback): method __init__ (line 80) | def __init__(self, checkpoint_manager): method on_epoch_end (line 84) | def on_epoch_end(self, epoch, logs=None): function _get_optimizer (line 89) | def _get_optimizer(learning_rate: float, gradient_clip_norm: float): function _get_metrics (line 95) | def _get_metrics(eval_top_k: List[int]): function compile_model (line 109) | def compile_model(model, eval_top_k, learning_rate, gradient_clip_norm): function build_keras_model (line 118) | def build_keras_model(input_config: input_config_pb2.InputConfig, function get_callbacks (line 141) | def get_callbacks(keras_model: tf.keras.Model, function train_and_eval (line 158) | def train_and_eval(model: tf.keras.Model, function save_model (line 178) | def save_model(checkpoint_path: str, export_dir: str, function export_tflite (line 203) | def export_tflite(export_dir): function export (line 216) | def export(checkpoint_path: str, input_config: input_config_pb2.InputCon... function load_input_config (line 241) | def load_input_config(): function prepare_model_config (line 248) | def prepare_model_config(): function main (line 259) | def main(_): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/recommendation_model_launcher_test.py class RecommendationModelLauncherTest (line 112) | class RecommendationModelLauncherTest(tf.test.TestCase): method _AssertSparseTensorValueEqual (line 114) | def _AssertSparseTensorValueEqual(self, a, b): method _assertInputDetail (line 119) | def _assertInputDetail(self, input_details, index, name, shape): method setUp (line 123) | def setUp(self): method testModelTrainEvalExport (line 153) | def testModelTrainEvalExport(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/recommendation_model_test.py class RecommendationModelTest (line 22) | class RecommendationModelTest(tf.test.TestCase): method _create_test_input_config (line 24) | def _create_test_input_config(self, method _create_test_model_config (line 50) | def _create_test_model_config(self): method test_model_train_bow (line 58) | def test_model_train_bow(self): method test_model_train_cnn (line 88) | def test_model_train_cnn(self): method test_model_train_lstm (line 118) | def test_model_train_lstm(self): FILE: tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/utils.py function GetShardFilenames (line 29) | def GetShardFilenames(filepattern): function ClipGradient (line 51) | def ClipGradient( FILE: tensorflow_examples/models/dcgan/dcgan.py function scale (line 39) | def scale(image, label): function create_dataset (line 46) | def create_dataset(buffer_size, batch_size): function make_generator_model (line 54) | def make_generator_model(): function make_discriminator_model (line 81) | def make_discriminator_model(): function get_checkpoint_prefix (line 101) | def get_checkpoint_prefix(): class Dcgan (line 108) | class Dcgan(object): method __init__ (line 117) | def __init__(self, epochs, enable_function, batch_size): method generator_loss (line 133) | def generator_loss(self, generated_output): method discriminator_loss (line 136) | def discriminator_loss(self, real_output, generated_output): method train_step (line 145) | def train_step(self, image): method train (line 177) | def train(self, dataset, checkpoint_pr): function run_main (line 209) | def run_main(argv): function main (line 216) | def main(epochs, enable_function, buffer_size, batch_size): FILE: tensorflow_examples/models/dcgan/dcgan_test.py class DcganTest (line 28) | class DcganTest(tf.test.TestCase): method test_one_epoch_with_function (line 30) | def test_one_epoch_with_function(self): method test_one_epoch_without_function (line 44) | def test_one_epoch_without_function(self): class DCGANBenchmark (line 59) | class DCGANBenchmark(tf.test.Benchmark): method __init__ (line 61) | def __init__(self, output_dir=None, **kwargs): method benchmark_with_function (line 64) | def benchmark_with_function(self): method benchmark_without_function (line 69) | def benchmark_without_function(self): method _run_and_report_benchmark (line 74) | def _run_and_report_benchmark(self, **kwargs): FILE: tensorflow_examples/models/densenet/densenet.py function calc_from_depth (line 31) | def calc_from_depth(depth, num_blocks, bottleneck): function calc_from_list (line 63) | def calc_from_list(depth, num_blocks, layers_per_block): function calc_from_integer (line 90) | def calc_from_integer(depth, num_blocks, layers_per_block): class ConvBlock (line 116) | class ConvBlock(tf.keras.Model): method __init__ (line 127) | def __init__(self, num_filters, data_format, bottleneck, weight_decay=... method call (line 155) | def call(self, x, training=True): class TransitionBlock (line 168) | class TransitionBlock(tf.keras.Model): method __init__ (line 178) | def __init__(self, num_filters, data_format, method call (line 193) | def call(self, x, training=True): class DenseBlock (line 200) | class DenseBlock(tf.keras.Model): method __init__ (line 215) | def __init__(self, num_layers, growth_rate, data_format, bottleneck, method call (line 229) | def call(self, x, training=True): class DenseNet (line 237) | class DenseNet(tf.keras.Model): method __init__ (line 269) | def __init__(self, mode, growth_rate, output_classes, depth_of_model=N... method call (line 366) | def call(self, x, training=True): FILE: tensorflow_examples/models/densenet/densenet_distributed_test.py class DenseNetDistributedBenchmark (line 31) | class DenseNetDistributedBenchmark(tf.test.Benchmark): method __init__ (line 33) | def __init__(self, output_dir=None, **kwargs): method benchmark_with_function_custom_loops (line 36) | def benchmark_with_function_custom_loops(self): method benchmark_with_function_custom_loops_300_epochs_2_gpus (line 40) | def benchmark_with_function_custom_loops_300_epochs_2_gpus(self): method benchmark_with_function_custom_loops_300_epochs_8_gpus (line 48) | def benchmark_with_function_custom_loops_300_epochs_8_gpus(self): method _run_and_report_benchmark (line 56) | def _run_and_report_benchmark(self, top_1_min=.944, top_1_max=.949, **... FILE: tensorflow_examples/models/densenet/densenet_test.py function create_sample_dataset (line 32) | def create_sample_dataset(batch_size): class DensenetTest (line 40) | class DensenetTest(tf.test.TestCase): method test_one_epoch_with_function_custom_loop (line 42) | def test_one_epoch_with_function_custom_loop(self): method test_one_epoch_with_keras_fit (line 61) | def test_one_epoch_with_keras_fit(self): class DenseNetBenchmark (line 81) | class DenseNetBenchmark(tf.test.Benchmark): method __init__ (line 83) | def __init__(self, output_dir=None, **kwargs): method benchmark_with_function_custom_loops (line 86) | def benchmark_with_function_custom_loops(self): method benchmark_without_function_custom_loops (line 90) | def benchmark_without_function_custom_loops(self): method benchmark_with_keras_fit (line 95) | def benchmark_with_keras_fit(self): method benchmark_with_function_custom_loops_300_epochs (line 100) | def benchmark_with_function_custom_loops_300_epochs(self): method benchmark_with_keras_fit_300_epochs (line 106) | def benchmark_with_keras_fit_300_epochs(self): method _run_and_report_benchmark (line 113) | def _run_and_report_benchmark(self, **kwargs): FILE: tensorflow_examples/models/densenet/distributed_train.py class Train (line 33) | class Train(object): method __init__ (line 44) | def __init__(self, epochs, enable_function, model, batch_size, strategy): method decay (line 60) | def decay(self, epoch): method compute_loss (line 68) | def compute_loss(self, label, predictions): method train_step (line 74) | def train_step(self, inputs): method test_step (line 95) | def test_step(self, inputs): method custom_loop (line 110) | def custom_loop(self, train_dist_dataset, test_dist_dataset, function run_main (line 172) | def run_main(argv): function main (line 184) | def main(epochs, FILE: tensorflow_examples/models/densenet/train.py class Train (line 27) | class Train(object): method __init__ (line 36) | def __init__(self, epochs, enable_function, model): method decay (line 52) | def decay(self, epoch): method keras_fit (line 60) | def keras_fit(self, train_dataset, test_dataset): method train_step (line 72) | def train_step(self, image, label): method test_step (line 91) | def test_step(self, image, label): method custom_loop (line 105) | def custom_loop(self, train_dataset, test_dataset): function run_main (line 149) | def run_main(argv): function main (line 160) | def main(epochs, FILE: tensorflow_examples/models/densenet/utils.py function define_densenet_flags (line 29) | def define_densenet_flags(): class Preprocess (line 68) | class Preprocess(object): method __init__ (line 75) | def __init__(self, data_format, train): method __call__ (line 79) | def __call__(self, image, label): method random_jitter (line 93) | def random_jitter(self, image): function create_dataset (line 103) | def create_dataset(buffer_size, batch_size, data_format, data_dir=None): function flags_dict (line 142) | def flags_dict(): function get_cifar10_kwargs (line 172) | def get_cifar10_kwargs(): FILE: tensorflow_examples/models/nmt_with_attention/distributed_test.py class NmtDistributedTest (line 27) | class NmtDistributedTest(tf.test.TestCase): method test_one_epoch_multi_device (line 29) | def test_one_epoch_multi_device(self): class NmtDistributedBenchmark (line 54) | class NmtDistributedBenchmark(tf.test.Benchmark): method __init__ (line 56) | def __init__(self, output_dir=None, **kwargs): method benchmark_one_epoch_1_gpu (line 59) | def benchmark_one_epoch_1_gpu(self): method benchmark_one_epoch_1_gpu_function (line 64) | def benchmark_one_epoch_1_gpu_function(self): method benchmark_ten_epochs_2_gpus (line 68) | def benchmark_ten_epochs_2_gpus(self): method _run_and_report_benchmark (line 73) | def _run_and_report_benchmark(self, **kwargs): FILE: tensorflow_examples/models/nmt_with_attention/distributed_train.py class DistributedTrain (line 34) | class DistributedTrain(Train): method __init__ (line 48) | def __init__(self, epochs, enable_function, encoder, decoder, inp_lang, method training_loop (line 54) | def training_loop(self, train_iterator, test_iterator, function run_main (line 103) | def run_main(argv): function main (line 109) | def main(epochs, enable_function, buffer_size, batch_size, download_path, FILE: tensorflow_examples/models/nmt_with_attention/nmt.py class Encoder (line 25) | class Encoder(tf.keras.Model): method __init__ (line 35) | def __init__(self, vocab_size, embedding_dim, enc_units, batch_sz): method call (line 45) | def call(self, x, hidden): method initialize_hidden_state (line 50) | def initialize_hidden_state(self): class BahdanauAttention (line 54) | class BahdanauAttention(tf.keras.Model): method __init__ (line 61) | def __init__(self, units): method call (line 67) | def call(self, query, values): class Decoder (line 88) | class Decoder(tf.keras.Model): method __init__ (line 97) | def __init__(self, vocab_size, embedding_dim, dec_units): method call (line 110) | def call(self, x, hidden, enc_output): FILE: tensorflow_examples/models/nmt_with_attention/nmt_test.py class NmtTest (line 28) | class NmtTest(tf.test.TestCase): method test_one_epoch (line 30) | def test_one_epoch(self): class NmtBenchmark (line 43) | class NmtBenchmark(tf.test.Benchmark): method __init__ (line 45) | def __init__(self, output_dir=None, **kwargs): method benchmark_one_epoch (line 48) | def benchmark_one_epoch(self): method benchmark_ten_epochs (line 52) | def benchmark_ten_epochs(self): method _run_and_report_benchmark (line 57) | def _run_and_report_benchmark(self, **kwargs): FILE: tensorflow_examples/models/nmt_with_attention/train.py class Train (line 29) | class Train(object): method __init__ (line 48) | def __init__(self, epochs, enable_function, encoder, decoder, inp_lang, method loss_function (line 64) | def loss_function(self, real, pred): method train_step (line 73) | def train_step(self, inputs): method test_step (line 108) | def test_step(self, inputs_test): method training_loop (line 139) | def training_loop(self, train_ds, test_ds): function run_main (line 174) | def run_main(argv): function main (line 180) | def main(epochs, enable_function, buffer_size, batch_size, download_path, FILE: tensorflow_examples/models/nmt_with_attention/utils.py function nmt_flags (line 38) | def nmt_flags(): function download (line 50) | def download(download_path): function unicode_to_ascii (line 59) | def unicode_to_ascii(s): function preprocess_sentence (line 64) | def preprocess_sentence(w): function create_word_pairs (line 91) | def create_word_pairs(path, num_examples): function max_length (line 100) | def max_length(tensor): function tokenize (line 104) | def tokenize(lang): function load_dataset (line 127) | def load_dataset(path, num_examples): function create_dataset (line 137) | def create_dataset(path_to_file, num_examples, buffer_size, batch_size): function get_common_kwargs (line 171) | def get_common_kwargs(): function flags_dict (line 176) | def flags_dict(): FILE: tensorflow_examples/models/pix2pix/data_download.py function _main (line 35) | def _main(argv): function main (line 41) | def main(download_path): FILE: tensorflow_examples/models/pix2pix/pix2pix.py function load (line 42) | def load(image_file): function resize (line 66) | def resize(input_image, real_image, height, width): function random_crop (line 75) | def random_crop(input_image, real_image): function normalize (line 83) | def normalize(input_image, real_image): function random_jitter (line 91) | def random_jitter(input_image, real_image): function load_image_train (line 117) | def load_image_train(image_file): function load_image_test (line 125) | def load_image_test(image_file): function create_dataset (line 134) | def create_dataset(path_to_train_images, path_to_test_images, buffer_size, class InstanceNormalization (line 161) | class InstanceNormalization(tf.keras.layers.Layer): method __init__ (line 164) | def __init__(self, epsilon=1e-5): method build (line 168) | def build(self, input_shape): method call (line 181) | def call(self, x): function downsample (line 188) | def downsample(filters, size, norm_type='batchnorm', apply_norm=True): function upsample (line 220) | def upsample(filters, size, norm_type='batchnorm', apply_dropout=False): function unet_generator (line 257) | def unet_generator(output_channels, norm_type='batchnorm'): function discriminator (line 318) | def discriminator(norm_type='batchnorm', target=True): function get_checkpoint_prefix (line 366) | def get_checkpoint_prefix(): class Pix2pix (line 373) | class Pix2pix(object): method __init__ (line 383) | def __init__(self, epochs, enable_function): method discriminator_loss (line 398) | def discriminator_loss(self, disc_real_output, disc_generated_output): method generator_loss (line 409) | def generator_loss(self, disc_generated_output, gen_output, target): method train_step (line 418) | def train_step(self, input_image, target_image): method train (line 453) | def train(self, dataset, checkpoint_pr): function run_main (line 485) | def run_main(argv): function main (line 493) | def main(epochs, enable_function, path, buffer_size, batch_size): FILE: tensorflow_examples/models/pix2pix/pix2pix_test.py class Pix2PixTest (line 30) | class Pix2PixTest(tf.test.TestCase): method test_one_step_with_function (line 32) | def test_one_step_with_function(self): method test_one_step_without_function (line 48) | def test_one_step_without_function(self): class Pix2PixBenchmark (line 66) | class Pix2PixBenchmark(tf.test.Benchmark): method __init__ (line 68) | def __init__(self, output_dir=None, **kwargs): method benchmark_with_function (line 71) | def benchmark_with_function(self): method benchmark_without_function (line 77) | def benchmark_without_function(self): method _run_and_report_benchmark (line 83) | def _run_and_report_benchmark(self, **kwargs): FILE: tensorflow_examples/profiling/imagenet_preprocessing_ineffecient_input_pipeline.py function process_record_dataset (line 73) | def process_record_dataset(dataset, function get_filenames (line 153) | def get_filenames(is_training, data_dir): function parse_example_proto (line 165) | def parse_example_proto(example_serialized): function parse_record (line 235) | def parse_record(raw_record, is_training, dtype): function get_parse_record_fn (line 269) | def get_parse_record_fn(use_keras_image_data_format=False): function input_fn (line 295) | def input_fn(is_training, function _decode_crop_and_flip (line 380) | def _decode_crop_and_flip(image_buffer, bbox, num_channels): function _central_crop (line 429) | def _central_crop(image, crop_height, crop_width): function _mean_image_subtraction (line 451) | def _mean_image_subtraction(image, means, num_channels): function _smallest_size_at_least (line 487) | def _smallest_size_at_least(height, width, resize_min): function _aspect_preserving_resize (line 518) | def _aspect_preserving_resize(image, resize_min): function _resize_image (line 537) | def _resize_image(image, height, width): function preprocess_image (line 557) | def preprocess_image(image_buffer, bbox, output_height, output_width, FILE: tensorflow_examples/profiling/resnet_model.py function change_keras_layer (line 46) | def change_keras_layer(use_tf_keras_layers=False): function _gen_l2_regularizer (line 69) | def _gen_l2_regularizer(use_l2_regularizer=True): function identity_block (line 73) | def identity_block(input_tensor, function conv_block (line 151) | def conv_block(input_tensor, function resnet50 (line 251) | def resnet50(num_classes,