Closed Lkruitwagen closed 2 years ago
You are right, thanks. Do you want to submit a PR and fix it?
Pi Esposito | piesposito.github.io http://piesposito.github.io
Em qua., 6 de abr. de 2022 às 12:39, Lucas Kruitwagen < @.***> escreveu:
When the bias=False the bias tensor being created in the forward pass and it isn't moved to the gpu.
— Reply to this email directly, view it on GitHub https://github.com/piEsposito/blitz-bayesian-deep-learning/issues/109, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLYRXQEJ2Y3TNCUGNSCMUDVDWV4HANCNFSM5SWOTDIA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Yeah sure! Can do. What do you reckon, something just like:
b = torch.zeros((self.out_features), device=x.device)
?
yes, something like that or b = torch.zeros((self.out_features), device=self.device)
When the
bias=False
the bias tensor being created in the forward pass and it isn't moved to the gpu.https://github.com/piEsposito/blitz-bayesian-deep-learning/blob/c70833e59f53dc21220e4e661b59d9923fc2b93b/blitz/modules/linear_bayesian_layer.py#L87