class_docstr: Represents datasets we use for expriments
docstr: fmnist dataset
docstr_tok: ["fmnist","dataset"]
code: def fmnist_dataset(self):
      """fmnist dataset"""
      transform_data = transforms.Compose(
          [transforms.ToTensor(), transforms.Normalize((0.5), (0.5))]
      )
      train_data_trans = datasets.FashionMNIST(
          root=PATH_PREFIX + "/data",
          download=True,
          train=True,
          transform=transform_data,
      )
      train_loader = torch.utils.data.DataLoader(
          train_data_trans, batch_size=len(train_data_trans)
      )
      x_train = next(iter(train_loader))[0].numpy()
      x_train = x_train.reshape(len(x_train), -1)
      y_train = next(iter(train_loader))[1].numpy()
      label0 = 0
      label1 = 3
      indx0 = np.nonzero(y_train == label0)[0]
      indx1 = np.nonzero(y_train == label1)[0]
      labels = y_train.copy()
      labels[indx0] = -1
      labels[indx1] = 1
      indx = np.concatenate((indx0, indx1))
      x_train = x_train[indx]
      labels = labels[indx]
      dataset = x_train, labels
      w_opt = self.find_optimal_classifier(dataset, bias=False)
      return x_train, labels, w_opt
  
imports: import os
  import ssl
  import tarfile
  import urllib.request
  from my_logistic_regression import MyLogisticRegression
  import numpy
  import requests
  from sklearn import preprocessing
  import sklearn.datasets
  from sklearn.linear_model import LogisticRegression
  import torch
  from torchvision import datasets, transforms
label_desc: Use image node_id 3 for calling the Mydatasets obj's underlying member method code with example usage: obj.fmnist_dataset() and returns: x_train,  labels,  w_opt