131/Deep-Learning-And-Reinforcement-Learning-Projects

/Project2/Model/Model.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 5 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project1/Project1.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 100 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project2/Model/__init__.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 5 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project1/__init__.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 10 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project2/Model/MobileNetV2.py
from torchvision.models import mobilenet_v2
import torch
import torch.nn as nn
from torchvision.models.mobilenet import Conv2dSame

class MobileNetV2(nn.Module):
def __init__(self, num_classes=1000):
super(MobileNetV2, self).__init__()
self.mobilenet = mobilenet_v2(pretrained=True)
self.mobilenet.classifier = nn.Sequential(
nn.Dropout(0.2),
nn.Linear(1280, num_classes),
)

def forward(self, x):
return self.mobilenet(x)

/Project2/Model/ResNet.py
from torchvision.models import resnet18
import torch
import torch.nn as nn

class ResNet18(nn.Module):
def __init__(self, num_classes=1000):
super(ResNet18, self).__init__()
self.resnet = resnet18(pretrained=True)
self.resnet.fc = nn.Linear(512, num_classes)

def forward(self, x):
return self.resnet(x)

/Project2/Project2.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 100 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project1/Model/Model.py
from torchvision.models import resnet18
import torch
import torch.nn as nn

class ResNet18(nn.Module):
def __init__(self, num_classes=1000):
super(ResNet18, self).__init__()
self.resnet = resnet18(pretrained=True)
self.resnet.fc = nn.Linear(512, num_classes)

def forward(self, x):
return self.resnet(x)

/Project2/Model/MobileNetV2.py
#!/bin/bash
# This script is used to run the training process for the model.

# Get the name of the model
model_name=$(python -c 'import Model; print(Model.__name__)')

# Get the file path of the model
model_file_path=$(python -c 'import Model; print(Model.__file__)')

# Run the training process
python $model_file_path --model_name $model_name --epochs 100 --batch_size 32 --learning_rate 0.001 --optimizer "adam"

/Project2/Project2.py
from torchvision.models import resnet18
import torch
import torch.nn as nn

class ResNet18(nn.Module):
def __init__(self, num_classes=1000):
super(ResNet18, self).__init__()
self.resnet = resnet18(pretrained=True)
self.resnet.fc = nn.Linear(512, num_classes)

def forward(self, x):
return self.resnet(x)

/Project2/Model/SqueezeNet.py
from