dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
50 stars 5 forks source link

tch_randn(-1) crashes my R session #20

Closed Athospd closed 5 years ago

Athospd commented 5 years ago

I tried to stress tch_randn() by passing the unexpected -1 value as the size arg and it made my R session crash.

I don't know if we must bother with it right now, make value checks is a pain in the ass, but it is good to know that unexpected arg values might lead to a unpleasant experiences.

dfalbel commented 5 years ago

Yes, we need to think on a default strategy for dealing with wrong arguments. Maybe define some internal functions to validate common classes like IntLists, sizes, etc.

dfalbel commented 5 years ago

This is related to #27