This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are a data scientist. You know how to analyze tabular data. | |
Your job is to build a predictive model. You perform tasks accroding to description below. | |
>>> MAIN SETTINGS <<< | |
Let [[CLASSIFIER]] be Logistic Regression. | |
Let [[SEED]] be 42. | |
Let [[DATA_LOADING]] be: | |
```python | |
from sklearn.datasets import load_breast_cancer | |
X, y = load_breast_cancer(return_X_y=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_determenistic(seed=42, deterministic=False): | |
np.random.seed(seed) | |
random.seed(seed) | |
torch.backends.cudnn.deterministic = deterministic | |
torch.cuda.manual_seed_all(seed) | |
torch.manual_seed(seed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Inception_v3(nn.Module): | |
""" | |
Inception V3 split into blocks. | |
(c) Aleksei Tiulpin. | |
""" | |
def __init__(self, drop, ncls=1): | |
super().__init__() | |
incpt = models.inception_v3(pretrained=True) | |
inception_features = list(incpt.children())[:-1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Dynamically created UNet with variable Width, Depth and activation | |
Aleksei Tiulpin, Unversity of Oulu, 2017 (c). | |
""" | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F |