# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

import os
import math
import data_loader
import ResNet as models
from config.miccai_settings import *

import torch

 os.environ["CUDA_VISIBLE_DEVICES"] = "1"

st = Settings()
options = st.get_options()

model = models.DANNet(num_classes=2)

model.sharedNet.conv1.weight

saved_model=None
if options['load_initial_weights']:
    saved_model = torch.load(options['initial_weights_file'])
    print(options['initial_weights_file'])

model.load_state_dict(saved_model.state_dict())

model.sharedNet.conv1.weight

for param_tensor in model.state_dict():
    print(param_tensor, "\t", model.state_dict()[param_tensor].size())



for param_tensor in model.state_dict():
    print(param_tensor, "\t", model.state_dict()[param_tensor].size())

StarcoderdataJupyterScriptsDedupFiltered