~\Anaconda3\envs\flabels\lib\site-packages\hiddenlayer\graph.py in build_graph(model, args, input_names, transforms, framework_transforms)
141 from .pytorch_builder import import_graph, FRAMEWORK_TRANSFORMS
142 assert args is not None, "Argument args must be provided for Pytorch models."
--> 143 import_graph(g, model, args)
144 elif framework == "tensorflow":
145 from .tf_builder import import_graph, FRAMEWORK_TRANSFORMS
~\Anaconda3\envs\flabels\lib\site-packages\hiddenlayer\pytorch_builder.py in import_graph(hl_graph, model, args, input_names, verbose)
68
69 # Run the Pytorch graph to get a trace and generate a graph from it
---> 70 trace, out = torch.jit._get_trace_graph(model, args)
71 torch_graph = torch.onnx._optimize_trace(trace, torch.onnx.OperatorExportTypes.ONNX)
72
~\Anaconda3\envs\flabels\lib\site-packages\torch\jit__init__.py in _get_trace_graph(f, args, kwargs, _force_outplace, return_inputs, _return_inputs_states)
275 if not isinstance(args, tuple):
276 args = (args,)
--> 277 outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
278 return outs
279
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in call(self, *input, kwargs)
530 result = self._slow_forward(*input, *kwargs)
531 else:
--> 532 result = self.forward(input, kwargs)
533 for hook in self._forward_hooks.values():
534 hook_result = hook(self, input, result)
~\Anaconda3\envs\flabels\lib\site-packages\torch\jit__init__.py in wrapper(args)
345 if self._return_inputs_states:
346 inputs_states.append(_unflatten(args[:len(in_vars)], in_desc))
--> 347 outs.append(self.inner(trace_inputs))
348 if self._return_inputs_states:
349 inputs_states[0] = (inputs_states[0], trace_inputs)
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in call(self, *input, kwargs)
528 input = result
529 if torch._C._get_tracing_state():
--> 530 result = self._slow_forward(*input, *kwargs)
531 else:
532 result = self.forward(input, kwargs)
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in _slow_forward(self, *input, *kwargs)
514 recording_scopes = False
515 try:
--> 516 result = self.forward(input, **kwargs)
517 finally:
518 if recording_scopes:
Just started using hidden layer, looks great but haven't gotten it to work yet. I am not sure what I am doing wrong here.
---> 839 graph = hl.build_graph(discriminator, torch.zeros([1, 1, 128, 128])) 840 graph = graph.build_dot() 841 graph.render('C:\Users\joshu\Documents\2019_Flabels\2020_HC_VACS2', view=True, format='png')
~\Anaconda3\envs\flabels\lib\site-packages\hiddenlayer\graph.py in build_graph(model, args, input_names, transforms, framework_transforms) 141 from .pytorch_builder import import_graph, FRAMEWORK_TRANSFORMS 142 assert args is not None, "Argument args must be provided for Pytorch models." --> 143 import_graph(g, model, args) 144 elif framework == "tensorflow": 145 from .tf_builder import import_graph, FRAMEWORK_TRANSFORMS
~\Anaconda3\envs\flabels\lib\site-packages\hiddenlayer\pytorch_builder.py in import_graph(hl_graph, model, args, input_names, verbose) 68 69 # Run the Pytorch graph to get a trace and generate a graph from it ---> 70 trace, out = torch.jit._get_trace_graph(model, args) 71 torch_graph = torch.onnx._optimize_trace(trace, torch.onnx.OperatorExportTypes.ONNX) 72
~\Anaconda3\envs\flabels\lib\site-packages\torch\jit__init__.py in _get_trace_graph(f, args, kwargs, _force_outplace, return_inputs, _return_inputs_states) 275 if not isinstance(args, tuple): 276 args = (args,) --> 277 outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs) 278 return outs 279
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in call(self, *input, kwargs) 530 result = self._slow_forward(*input, *kwargs) 531 else: --> 532 result = self.forward(input, kwargs) 533 for hook in self._forward_hooks.values(): 534 hook_result = hook(self, input, result)
~\Anaconda3\envs\flabels\lib\site-packages\torch\jit__init__.py in forward(self, *args) 358 in_vars + module_state, 359 _create_interpreter_name_lookup_fn(), --> 360 self._force_outplace, 361 ) 362
~\Anaconda3\envs\flabels\lib\site-packages\torch\jit__init__.py in wrapper(args) 345 if self._return_inputs_states: 346 inputs_states.append(_unflatten(args[:len(in_vars)], in_desc)) --> 347 outs.append(self.inner(trace_inputs)) 348 if self._return_inputs_states: 349 inputs_states[0] = (inputs_states[0], trace_inputs)
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in call(self, *input, kwargs) 528 input = result 529 if torch._C._get_tracing_state(): --> 530 result = self._slow_forward(*input, *kwargs) 531 else: 532 result = self.forward(input, kwargs)
~\Anaconda3\envs\flabels\lib\site-packages\torch\nn\modules\module.py in _slow_forward(self, *input, *kwargs) 514 recording_scopes = False 515 try: --> 516 result = self.forward(input, **kwargs) 517 finally: 518 if recording_scopes:
TypeError: forward() missing 1 required positional argument: 'x'