Ejemplo n.º 1
0
 def from_file(cls, address):
     fileObject = open(address, 'r')
     mem = pickle.load(fileObject)
     shape = pickle.load(fileObject)
     weigth_set_new = cls(shape)
     weigth_set_new.mem[:] = nn.array(mem)
     return weigth_set_new
Ejemplo n.º 2
0
 def from_file(cls,address):
     fileObject = open(address,'r')         
     mem = pickle.load(fileObject)
     shape = pickle.load(fileObject)
     weigth_set_new = cls(shape)
     weigth_set_new.mem[:] = nn.array(mem)
     return weigth_set_new
Ejemplo n.º 3
0
 def save(self, address):
     fileObject = open(address, 'wb')
     pickle.dump(nn.array(self.mem), fileObject)
     pickle.dump(self.shape, fileObject)
     fileObject.close()
Ejemplo n.º 4
0
 def save(self,address):
     fileObject = open(address,'wb')   
     pickle.dump(nn.array(self.mem),fileObject)   
     pickle.dump(self.shape,fileObject) 
     fileObject.close()