![]() ![]() Sequential ( l, l ) > for idx, m in enumerate ( net. The submodule referenced by target Return type :Ĭasts all floating point parameters and buffers to half datatype. Target ( str) – The fully-qualified string name of the submodule If some submodule exists, get_submodule should always be Named_modules achieves the same result, but it is O(N) in The runtime of get_submodule is bounded by the degree We have the conv submodule, we would call Would call get_submodule("net_b.linear"). To check whether or not we have the linear submodule, we Submodule net_b, which itself has two submodules net_cĪnd linear. (linear): Linear(in_features=100, out_features=200, bias=True) Returns the submodule given by target if it exists,įor example, let’s say you have an nn.Module A that Path or resolves to something that is not an The Parameter referenced by target Return type : Target ( str) – The fully-qualified string name of the Parameter Returns the parameter given by target if it exists, Returns :Īny extra state to store in the module’s state_dict Return type : We only provide provide backwards compatibility guaranteesįor serializing Tensors other objects may break backwards compatibility if Note that extra state should be picklable to ensure working serialization This function is called when building the Implement this and a corresponding set_extra_state() for your module Returns any extra state to include in the module’s state_dict. Path or resolves to something that is not a ![]() The buffer referenced by target Return type :ĪttributeError – If the target string references an invalid Target ( str) – The fully-qualified string name of the buffer ![]() See the docstring for get_submodule for a more detailedĮxplanation of this method’s functionality as well as how to Returns the buffer given by target if it exists, Registered hooks while the latter silently ignores them. Instead of this since the former takes care of running the This function, one should call the Module instance afterwards
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |