File size: 868 Bytes
d39ef0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from scripts.import_utils import instantiate_from_config
from scripts.modules.losses.phyloloss import get_loss_name
from scripts.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer
from scripts.models.vqgan import VQModel
from scripts.models.phyloautoencoder import PhyloVQVAE
from scripts.analysis_utils import Embedding_Code_converter
import scripts.constants as CONSTANTS


import torch
from torch import nn
import numpy
from torchinfo import summary
import itertools
import math

class PhyloLDM(PhyloVQVAE):
    def __init__(self, **args):
        print(args)

        # For wandb
        self.save_hyperparameters()
        self.freeze()
 
        # # self.phylo_disentangler = PhyloDisentangler(**phylo_args)
        # self.phylo_disentangler = PhyloDisentanglerConv(**phylo_args)

        # self.verbose = phylo_args.get('verbose', False)