text: import os
  import sys
  import numpy as np
  import pandas as pd
  import torch
  import matplotlib.pyplot as plt
  from torch import nn, optim
  from torch.utils.data import DataLoader
  import torch.nn.functional as F
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import MinMaxScaler
  work_dir = os.path.abspath("./src/test/resources")
  sys.path.append(work_dir)
  print("work_dir---",work_dir)
  
  class Regressor(nn.Module):
      def __init__(self):
          super().__init__()
          self.fc1 = nn.Linear(288, 144)
          self.fc2 = nn.Linear(144, 72)
          self.fc3 = nn.Linear(72, 18)
          self.fc4 = nn.Linear(18, 1)
  
      def forward(self, x):
  
          x = F.relu(self.fc1(x))
          x = F.relu(self.fc2(x))
          x = F.relu(self.fc3(x))
          x = F.relu(self.fc4(x))
  
          return x
      
      
  model = Regressor()
  
  optimizer = optim.Adam(model.parameters(), lr=0.001)
  
  #checkpoint = torch.load('RegressionModel.pt')
  checkpoint = torch.load(os.path.join(work_dir,'inference\\pytorch\\RegressionModel.pt'))
  model.load_state_dict(checkpoint['model_state_dict'])
  optimizer.load_state_dict(checkpoint['optimizer_state_dict'])
  epoch = checkpoint['epoch']
  loss = checkpoint['loss']
  
  model.eval()
  
  data_train = pd.read_csv('train.csv')
  #data_train = pd.read_csv(os.path.join(work_dir,'train.csv'))
  data = pd.get_dummies(data_train, dummy_na=True, drop_first=True)
  data.drop('Id', axis=1, inplace=True)
  data.isnull().values.any()
  
  data.fillna(data.median(), inplace=True)
  columns = data.columns
  sale_price = data['SalePrice']
  data.isnull().values.any()
  
  
  scaler = MinMaxScaler()
  data = pd.DataFrame(scaler.fit_transform(data), columns = columns)
  data['SalePrice'] = sale_price
  print(data.head())
  
  
  train = data.iloc[:1460]
  test = data.iloc[1460:]
  test.drop('SalePrice', axis=1, inplace=True)
  
  print(test.head())
  
  X_train, X_val, y_train, y_val = train_test_split(train.drop('SalePrice', axis=1), train['SalePrice'], test_size=0.2, random_state=42)
  
  X_train.shape
  
  class Regressor(nn.Module):
      def __init__(self):
          super().__init__()
          self.fc1 = nn.Linear(288, 144)
          self.fc2 = nn.Linear(144, 72)
          self.fc3 = nn.Linear(72, 18)
          self.fc4 = nn.Linear(18, 1)
  
      def forward(self, x):
  
          x = F.relu(self.fc1(x))
          x = F.relu(self.fc2(x))
          x = F.relu(self.fc3(x))
          x = F.relu(self.fc4(x))
  
          return x
      
      
  train_batch = np.array_split(X_train, 50)
  label_batch = np.array_split(y_train, 50)
  for i in range(len(train_batch)):
      train_batch[i] = torch.from_numpy(train_batch[i].values).float()
  for i in range(len(label_batch)):
      label_batch[i] = torch.from_numpy(label_batch[i].values).float().view(-1, 1)
  
  X_val = torch.from_numpy(X_val.values).float()
  y_val = torch.from_numpy(y_val.values).float().view(-1, 1)
  model = Regressor()
  ps = model(train_batch[0])
  ps.shape
  
  #inference code
  #the X_test dimenstion is 1x288 columns
  #X_test will be input from Java
  print("X_test----"X_test)
  X_test = X_val
  with torch.no_grad():
      model.eval()
      output = model(X_val)
      print('outputis')
  
  print(output.shape)
  print(output[0])
  