MCPcopy Create free account
hub / github.com/chengsen/PyTorch_TextGCN / convert_tensor

Method convert_tensor

trainer.py:152–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 self.test_lst = self.predata.test_lst
151
152 def convert_tensor(self):
153 self.model = self.model.to(self.device)
154 self.adj = self.adj.to(self.device)
155 self.features = self.features.to(self.device)
156 self.target = th.tensor(self.target).long().to(self.device)
157 self.train_lst = th.tensor(self.train_lst).long().to(self.device)
158 self.val_lst = th.tensor(self.val_lst).long().to(self.device)
159
160 def train(self):
161 for epoch in range(self.max_epoch):

Callers 1

fitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected