Skip to content

nn/modules/batchnorm.h redefines "F" #30682

@meganset

Description

@meganset

As part of pull request #28790,
F is redefined globally in nn/modules/batchnorm.h

namespace F = torch::nn::functional;

F is then used once in batchnorm.h and again in instancenorm.h

not a bug, but a problem for anyone using F in some other way.
it's solvable, but I don't see this pattern anywhere else in libtorch,
was wondering if this use is an anomaly,
and if we could use

return torch::nn::functional::detail::batch_norm(
return torch::nn::functional::detail::instance_norm(

thanks

cc @yf225

Metadata

Metadata

Assignees

Labels

module: cppRelated to C++ APItriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions