Skip to content

Got memory leak error when I use Tensorflow::Tensor.new(array, :float) #106

@baibonjwa

Description

@baibonjwa

When I build an complex tensor using the Tensorflow::Tensor.new(array, :float), I got a memory leak error(seems only happened on a big array). It maybe an memory malloc issue. When I change the data_size of Tensorflow::TF_FLOAT to 4(original value is 8) and the issue will be fixed. Is this a bug or it depends on my local C++ compiler or my usage issue?
Here is the code: https://github.com/somaticio/tensorflow.rb/blob/master/lib/tensorflow/tensor.rb#L76

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions