DLFS_code icon indicating copy to clipboard operation
DLFS_code copied to clipboard

exp_ratios function missing

Open dalupus opened this issue 6 years ago • 4 comments

When trying to import out of lincoln.losses it complains: ImportError: cannot import name 'exp_ratios' from 'lincoln.utils.np_utils'

I have looked and this method does not exist in lincoln.utils.np_utils (or anywhere else in the repo that I can see)

dalupus avatar Sep 22 '19 21:09 dalupus

I have the same problem: there is no 'exp_ratios' to be found. Dalpus, are we the only two people who have gotten as far as chapter 4 and actually tried to run the code?

skaminsky9 avatar Jan 12 '20 17:01 skaminsky9

Me too!!!!!!!!!!!!!!!!!!!!!.But I found a file with the same name on github, but it doesn't work!Do you know the file functions for the anything??

tutussss avatar Feb 16 '20 06:02 tutussss

Short answer: comment out the reference to "exp_ratios." I have run all the code in the book (except for when it made my inadequate computer crash), and I don't believe "exp_ratios" is ever used. So, go into the "lincoln" folder, open "losses.py," and put the pound sign (hashtag sign) here:

from lincoln.utils.np_utils import (assert_same_shape, softmax, normalize, #exp_ratios, does not exist unnormalize)

skaminsky9 avatar Feb 16 '20 14:02 skaminsky9

It exists in the git history but was deleted back in 08/13/2019: https://github.com/SethHWeidman/DLFS_code/commit/60348e98ecf5f4951228faec446d951ac439ae37#diff-0dc5235637898e6faadc6c47eb942600e3030e0bf4543bf62444612967bb1b1a

It does not seem like the author was really using the function, and must not have realized it was being imported ...

RagingTiger avatar Aug 23 '22 20:08 RagingTiger