Add files via upload
This commit is contained in:
parent
6d86bb04bb
commit
7bcd733d3d
2 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import torch
|
||||
from NNMF2d import NNMF2d
|
||||
from Y import Y
|
||||
|
||||
|
||||
def make_optimize(
|
||||
|
@ -44,6 +45,13 @@ def make_optimize(
|
|||
for netp in network[layerid].parameters():
|
||||
list_cnn.append(netp)
|
||||
|
||||
if isinstance(network[layerid], Y):
|
||||
for sublayer in network[layerid].segments:
|
||||
for subsublayer in sublayer:
|
||||
if isinstance(subsublayer, NNMF2d):
|
||||
for netp in subsublayer.parameters():
|
||||
list_nnmf.append(netp)
|
||||
|
||||
if isinstance(network[layerid], NNMF2d):
|
||||
for netp in network[layerid].parameters():
|
||||
list_nnmf.append(netp)
|
||||
|
|
|
@ -127,6 +127,7 @@ def main(
|
|||
|
||||
print(network)
|
||||
|
||||
|
||||
(
|
||||
optimizer_nnmf,
|
||||
optimizer_cnn,
|
||||
|
|
Loading…
Reference in a new issue