You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #1139 (which is my workaround to this issue for the time being), I'm in a situation where I have multiple, paired sets of inputs to an application but not necessarily a fixed number. It'd be nice if list and tuple arguments to an application method that contain tensors could have their contents sensibly tagged.
What I'm doing in my own code right now (I'm passing all my apply arguments via **kwargs here):
I think the cleanest thing is probably to just do an isinstance check on the variable argument in copy_and_tag recurse if a list or tuple is found. We could also make this behaviour configurable in the Application constructor as pass it as an argument to copy_and_tag.
(Actually, type(variable) in (list, tuple) would be safer since we know how to actually construct those objects, but not necessarily for subclasses; we could just assume that type(variable)(<sequence>) is the right constructor but this is dangerous.)
Related to #1139 (which is my workaround to this issue for the time being), I'm in a situation where I have multiple, paired sets of inputs to an application but not necessarily a fixed number. It'd be nice if list and tuple arguments to an application method that contain tensors could have their contents sensibly tagged.
What I'm doing in my own code right now (I'm passing all my apply arguments via
**kwargs
here):The text was updated successfully, but these errors were encountered: