<reponame>data-science-fundementals-cs245/Project_1-Dimensionality-Reduction
#-*- coding:utf-8 -*-
import torch
import torch.nn as nn

class Model(nn.Module):

    def __init__(self):
        """ Initialize model. """
        super(Model, self).__init__()

    def init_weights(self, initrange=0.2):
        """Initialize weights."""
        pass

    def forward(self):
        pass

    def load_model(self, load_dir):
        if self.device.type == 'cuda':
            self.load_state_dict(torch.load(open(load_dir, 'rb')))
        else:
            self.load_state_dict(torch.load(open(load_dir, 'rb'), map_location=lambda storage, loc: storage))

    def save_model(self, save_dir):
        torch.save(self.state_dict(), open(save_dir, 'wb'))


#-*- coding:utf-8 -*-
import torch
import torch.nn as nn

class Model(nn.Module):

    def __init__(self):
        """ Initialize model. """
        super(Model, self).__init__()

    def init_weights(self, initrange=0.2):
        """Initialize weights."""
        pass

    def forward(self):
        pass

    def load_model(self, load_dir):
        if self.device.type == 'cuda':
            self.load_state_dict(torch.load(open(load_dir, 'rb')))
        else:
            self.load_state_dict(torch.load(open(load_dir, 'rb'), map_location=lambda storage, loc: storage))

    def save_model(self, save_dir):
        torch.save(self.state_dict(), open(save_dir, 'wb'))
#-*- coding:utf-8 -*- Initialize model. Initialize weights.