(env) chaahm@HCAPC3612:~/DFQ$ python main_ssd.py --quantize --relu --equalize
main_ssd.py:90: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requiresgrad(True), rather than torch.tensor(sourceTensor).
all_gt_boxes[class_index][image_id] = torch.tensor(all_gt_boxes[class_index][image_id])
register <class 'torch.nn.modules.conv.Conv2d'> <class 'utils.quantize.QuantNConv2d'>
register <class 'torch.nn.modules.linear.Linear'> <class 'utils.quantize.QuantNLinear'>
register <class 'torch.nn.modules.activation.ReLU6'> <class 'torch.nn.modules.activation.ReLU'>
Traceback (most recent call last):
File "main_ssd.py", line 214, in
net, transformer = switch_layers(net, transformer, data, module_dict, ignore_layer=[QuantMeasure], quant_op=args.quantize)
File "/home/chaahm/DFQ/utils/layer_transform.py", line 158, in switch_layers
transformer._build_graph(model, data) # construt graph after all state_dict loaded
File "/home/chaahm/DFQ/PyTransformer/transformers/torchTransformer.py", line 349, in _build_graph
self.log = tmp_model.forward(self.log)
File "/home/chaahm/DFQ/modeling/detection/ssd.py", line 58, in forward
x = layer(x)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, kwargs)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, *kwargs)
File "/home/chaahm/DFQ/PyTransformer/transformers/utils.py", line 330, in forward
out_tensor = self.origin_layer(log_tensor).clone()
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(input, kwargs)
File "/home/chaahm/DFQ/utils/quantize.py", line 246, in forward
input = self.quant(input)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr
type(self).name, name))
AttributeError: 'QuantNConv2d' object has no attribute 'quant'
(env) chaahm@HCAPC3612:~/DFQ$ python main_ssd.py --quantize --relu --equalize main_ssd.py:90: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requiresgrad(True), rather than torch.tensor(sourceTensor). all_gt_boxes[class_index][image_id] = torch.tensor(all_gt_boxes[class_index][image_id]) register <class 'torch.nn.modules.conv.Conv2d'> <class 'utils.quantize.QuantNConv2d'> register <class 'torch.nn.modules.linear.Linear'> <class 'utils.quantize.QuantNLinear'> register <class 'torch.nn.modules.activation.ReLU6'> <class 'torch.nn.modules.activation.ReLU'> Traceback (most recent call last): File "main_ssd.py", line 214, in
net, transformer = switch_layers(net, transformer, data, module_dict, ignore_layer=[QuantMeasure], quant_op=args.quantize)
File "/home/chaahm/DFQ/utils/layer_transform.py", line 158, in switch_layers
transformer._build_graph(model, data) # construt graph after all state_dict loaded
File "/home/chaahm/DFQ/PyTransformer/transformers/torchTransformer.py", line 349, in _build_graph
self.log = tmp_model.forward(self.log)
File "/home/chaahm/DFQ/modeling/detection/ssd.py", line 58, in forward
x = layer(x)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, kwargs)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, *kwargs)
File "/home/chaahm/DFQ/PyTransformer/transformers/utils.py", line 330, in forward
out_tensor = self.origin_layer(log_tensor).clone()
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(input, kwargs)
File "/home/chaahm/DFQ/utils/quantize.py", line 246, in forward
input = self.quant(input)
File "/home/chaahm/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr
type(self).name, name))
AttributeError: 'QuantNConv2d' object has no attribute 'quant'