tiagoCuervo / MINE

A Pytorch implementation of the Mutual Information Neural Estimator
MIT License
10 stars 3 forks source link

Fixing bugs #2

Closed NirmalSankalana closed 4 months ago

NirmalSankalana commented 8 months ago

Instead of using np.asscalar and detach().numpy(), the code now uses mi.item() directly to append the value to miHistory. This is a more concise and efficient way of obtaining the scalar value of a tensor.

The return statement for the MI value was modified to directly return mi.item() instead of using np.asscalar and data.numpy().