Skip to content

JavaScript heap out of memory when using InceptionV3 #886

@JonathanWilbur

Description

@JonathanWilbur

Hello, when I load the InceptionV3 model, I get an OOM error.

2024-09-10 03:39:54.974309: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numeri.
2024-09-10 03:39:54.995204: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep A
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
You're using the model: 'InceptionV3'. See NSFWJS docs for instructions on hosting your own model (https://github.com/infinitered/nsfw.

<--- Last few GCs --->

[473351:0x66634f0]    30548 ms: Mark-Compact (reduce) 1945.8 (1950.7) -> 1945.8 (1949.7) MB, 470.16 / 0.00 ms  (average mu = 0.443, cud
[473351:0x66634f0]    31020 ms: Mark-Compact (reduce) 1945.8 (1949.7) -> 1945.8 (1949.7) MB, 471.84 / 0.00 ms  (average mu = 0.275, cud


<--- JS stacktrace --->

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xb86ecf node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
 2: 0xef74d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 3: 0xef77b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x10f87aa v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::Allocat]
 5: 0x10d4ba6 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
 6: 0x10c631c v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
 7: 0x10c6484 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, ]
 8: 0x13e707d v8::internal::Handle<v8::internal::NumberDictionary> v8::internal::HashTable<v8::internal::NumberDictionary, v8::interna]
 9: 0x13e72a3 v8::internal::Handle<v8::internal::NumberDictionary> v8::internal::HashTable<v8::internal::NumberDictionary, v8::interna]
10: 0x13e7f44 v8::internal::Handle<v8::internal::NumberDictionary> v8::internal::Dictionary<v8::internal::NumberDictionary, v8::intern]
11: 0x12a2d58  [node]
12: 0x1349f86 v8::internal::JSObject::AddDataElement(v8::internal::Handle<v8::internal::JSObject>, unsigned int, v8::internal::Handle<]
13: 0x13d24f3 v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::int]
14: 0x1346382 v8::internal::JSReceiver::ValidateAndApplyPropertyDescriptor(v8::internal::Isolate*, v8::internal::LookupIterator*, bool]
15: 0x13469e5 v8::internal::JSReceiver::OrdinaryDefineOwnProperty(v8::internal::LookupIterator*, v8::internal::PropertyDescriptor*, v8]
16: 0x1346b96 v8::internal::JSReceiver::OrdinaryDefineOwnProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSObject>]
17: 0x1346dee v8::internal::JSReceiver::DefineOwnProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSReceiver>, v8::]
18: 0x1346ee8 v8::internal::JSReceiver::DefineProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::interna]
19: 0xf8b0df v8::internal::Builtin_ObjectDefineProperty(int, unsigned long*, v8::internal::Isolate*) [node]
20: 0x7fd143ed9df6 
Aborted

This is on Ubuntu Linux with no GPU (if that matters).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions