torch / nn

Other
1.34k stars 967 forks source link

Only update addBuffer when bias is used #1280

Closed wenkesj closed 7 years ago

wenkesj commented 7 years ago

This should save ns and memory when the bias parameter is not used. When the input size is large, there would be a difference in memory footprint, but that's it.