File size: 652 Bytes
68d7781
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import torchaudio
import torch
import torch.nn as nn
import numpy as np
from functions import *
from unet import UNet

"""

model = UNet()

model_state_dict = torch.load("huggingface/model.pth", map_location="cpu")

model.load_state_dict(model_state_dict["model_state_dict"])

print("# of trainable parameters =", sum(p.numel() for p in model.parameters() if p.requires_grad))



audio = load_audio("huggingface/p232_001.wav")

enhanced = predict("huggingface/p232_001.wav", model)

print(enhanced.shape)"""
string = "C:/Users/durim/Documents/KTH/Master_År2/DT2119-SSR/project_feature_extraction.ipynb"
print("/".join(string.split("/")[:-1]))