Hello, I modified your model with other convolution models. When training the modified model, weight initialization function throws out an error:
Traceback (most recent call last):
File "train.py", line 2, in
main(mode=1)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/main.py", line 48, in main
model = EdgeConnect(config)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/edge_connect.py", line 29, in init
self.inpaint_model = InpaintingModel(config).to(config.DEVICE)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/models.py", line 159, in init
generator = InpaintGenerator()
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 110, in init
self.init_weights()
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 36, in init_weights
self.apply(init_func)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 288, in apply
fn(self)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 33, in initfunc
nn.init.normal(m.weight.data, 1.0, gain)
AttributeError: 'NoneType' object has no attribute 'data'
It seems that something is wrong with weight initialization, anyone got any ideas? Many Thanks!
Hello, I modified your model with other convolution models. When training the modified model, weight initialization function throws out an error:
Traceback (most recent call last): File "train.py", line 2, in
main(mode=1)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/main.py", line 48, in main
model = EdgeConnect(config)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/edge_connect.py", line 29, in init
self.inpaint_model = InpaintingModel(config).to(config.DEVICE)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/models.py", line 159, in init
generator = InpaintGenerator()
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 110, in init
self.init_weights()
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 36, in init_weights
self.apply(init_func)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 287, in apply
module.apply(fn)
File "/home/mw/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 288, in apply
fn(self)
File "/home/mw/Desktop/codes/edge-connect-RNB+L/src/networks.py", line 33, in initfunc
nn.init.normal(m.weight.data, 1.0, gain)
AttributeError: 'NoneType' object has no attribute 'data'
It seems that something is wrong with weight initialization, anyone got any ideas? Many Thanks!