AttributeError                            Traceback (most recent call last)
 in 
1 tb=SummaryWriter
2 graph_data=next(iter(train_loader))[‘data’]
----> 3 tb.add_graph(model1,graph_data)
4 tb.close()
~/anaconda3/lib/python3.7/site-packages/torch/utils/tensorboard/writer.py in add_graph(self, model, input_to_model, verbose)
695             else:
696                 # Handles cnn.CNNModelHelper, model_helper.ModelHelper
–> 697                 current_graph = model_to_graph_def(model)
698             event = event_pb2.Event(
699                 graph_def=current_graph.SerializeToString())
~/anaconda3/lib/python3.7/site-packages/torch/utils/tensorboard/_caffe2_graph.py in model_to_graph_def(model, **kwargs)
772             **kwargs. See _operators_to_graph_def for detailed **kwargs.
773     ‘’’
–> 774     nets = [model.param_init_net, model.net]
775     return nets_to_graph_def(nets, **kwargs)
776
AttributeError: ‘Tensor’ object has no attribute ‘param_init_net’