<p dir="auto">The file <code class="notranslate">tensorflow/lite/experimental/micro/README.md</code> says</p>
<blockquote>
<p dir="auto">The core runtime fits in 16KB on a Cortex M3, and with enough operators to run a speech keyword detection model, takes up a total of 22KB.</p>
</blockquote>
<p dir="auto">But after compiling <code class="notranslate">libtensorflow-microlite.a</code>, I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ls -lh
total 512
-rw-r--r--  1 xxx  xxx   254K Sep  9 18:11 libtensorflow-microlite.a"><pre class="notranslate"><code class="notranslate">ls -lh
total 512
-rw-r--r--  1 xxx  xxx   254K Sep  9 18:11 libtensorflow-microlite.a
</code></pre></div>
<p dir="auto">which is an order of magnitude larger than <code class="notranslate">22KB</code>.</p>
<p dir="auto">The command I used to compile it is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="make -j2 -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=foo microlite"><pre class="notranslate"><code class="notranslate">make -j2 -f tensorflow/lite/experimental/micro/tools/make/Makefile TARGET=foo microlite
</code></pre></div>
<p dir="auto">The configuration file <code class="notranslate">lite/experimental/micro/tools/make/targets/foo_makefile.inc</code> is</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ifeq ($(TARGET), foo)

TARGET_TOOLCHAIN_PREFIX := arm-none-eabi-

COMMON_FLAGS := \
-O2 \
-fno-unwind-tables \
-fstack-reuse=all -ffunction-sections -fdata-sections -Wl,--gc-sections -nostartfiles \
-mthumb -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
-mno-thumb-interwork -ffast-math  \
-Wall -Werror -Wlogical-op -Waddress -Wempty-body -Wpointer-arith \
-Wenum-compare  -fno-strict-aliasing \
-Wno-sign-compare \
-nostdlib \
-fno-exceptions \
-fno-unwind-tables \
-fno-builtin

CXXFLAGS += $(COMMON_FLAGS) -fno-rtti
CCFLAGS += $(COMMON_FLAGS)

endif"><pre class="notranslate"><code class="notranslate">ifeq ($(TARGET), foo)

TARGET_TOOLCHAIN_PREFIX := arm-none-eabi-

COMMON_FLAGS := \
-O2 \
-fno-unwind-tables \
-fstack-reuse=all -ffunction-sections -fdata-sections -Wl,--gc-sections -nostartfiles \
-mthumb -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
-mno-thumb-interwork -ffast-math  \
-Wall -Werror -Wlogical-op -Waddress -Wempty-body -Wpointer-arith \
-Wenum-compare  -fno-strict-aliasing \
-Wno-sign-compare \
-nostdlib \
-fno-exceptions \
-fno-unwind-tables \
-fno-builtin

CXXFLAGS += $(COMMON_FLAGS) -fno-rtti
CCFLAGS += $(COMMON_FLAGS)

endif
</code></pre></div>
<p dir="auto">The compiler toolchain information is as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."><pre class="notranslate"><code class="notranslate">$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</code></pre></div>
<p dir="auto">Hello,<br>
I would like to ask if current API of datasets allows for implementation of oversampling algorithm? I deal with highly imbalanced class problem. I was thinking that it would be nice to oversample specific classes during dataset parsing i.e. online generation. I've seen the implementation for <code class="notranslate">rejection_resample</code>  function, however this removes samples instead of duplicating them and its slows down batch generation (when target distribution is much different then initial one). The thing I would like to achieve is: to take an example, look at its class probability decide if duplicate it or not. Then call <code class="notranslate">dataset.shuffle(...)</code> <code class="notranslate">dataset.batch(...)</code> and get iterator. The best (in my opinion) approach would be to oversample low probable classes and subsample most probable ones. I would like to do it online since it's more flexible. Just wondering if this is possible with current API?</p>