-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove the hard torch library dependecies #10
Conversation
@parrt |
Hi @noklam thanks very much for your help! Maybe instead of |
I don't know if there is any difference between https://stackoverflow.com/questions/510972/getting-the-class-name-of-an-instance |
Yeah, I guess you're right. I wonder if we need to check if module is torch and name is Shape. Re inheritance: likely most people are not subclassing torch tensors. if so, though, wouldn't Shape get inherited into subclass and our test would work? |
@parrt Yes, I think it should still work. I think you mean name is Size ? p.s. I know fastai is subclassing torch tensor. :) https://github.com/fastai/fastai/blob/e34fee816f5dcbf05a9bc9b44e617902a52549fc/fastai/torch_core.py#L300 Btw the
I am getting
|
Added the checking for module and name |
yeah test?.py are just junk drawers. deleted test1.py yep, Shape=>Size |
Looks great! Merging. |
Done! Does it look right?
Ter
… On Oct 10, 2020, at 11:25 AM, noklam ***@***.***> wrote:
hacktoberfest-accepted
|
Thanks it works! Can you add it to #3 too? |
Done!
On Sat, Oct 10, 2020 at 9:07 PM noklam ***@***.***> wrote:
Thanks it works! Can you add it to #3
<#3> too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLUWNOL4IVCMI7AJSG2DLSKEVP7ANCNFSM4SLE25OA>
.
--
Dictation in use. Please excuse homophones, malapropisms, and nonsense.
|
@parrt Thanks! |
#9
Get rid of importing torch.Size by using type(v.shape).name instead/