Skip to content

Instantly share code, notes, and snippets.

View VineethKumar7's full-sized avatar
🎧
Fun

Vineeth Kumar VineethKumar7

🎧
Fun
View GitHub Profile
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
def calculate_mse_loss(model: nn.Module, dataloader: DataLoader, max_samples: int = None, device: torch.device = torch.device("cpu")) -> float:
"""
Calculate the Mean Squared Error (MSE) loss between the predictions of a model and the actual target values
in a dataset.
Parameters:
@VineethKumar7
VineethKumar7 / gist:f7d13d9e65e1c80d0a7c301adbe17863
Created August 17, 2021 07:25
Console output of maven-walkmod-plugin
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building employee 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- walkmod-maven-plugin:1.0.3:apply (default-cli) @ employee ---
INFO [main] - C:\Users\User\Drive\Desktop\Project\Walkmode\Employee-Sample-App-master\Employee-Sample-App-master\walkmod.xml [ok]
:: loading settings :: url = jar:file:/C:/Users/User/.m2/repository/org/walkmod/walkmod-cmd/3.0.0/walkmod-cmd-3.0.0.jar!/ivysettings.xml
:: loading settings :: url = jar:file:/C:/Users/User/.m2/repository/org/apache/ivy/ivy/2.4.0-rc1/ivy-2.4.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml