23
23
"""
24
24
25
25
""" Import Python Libraries """
26
+ import math
26
27
import os
28
+ import random
27
29
from argparse import ArgumentParser
28
30
from typing import List
31
+
29
32
import matplotlib .pyplot as plt
30
33
import numpy as np
31
34
import pandas as pd
32
- import math
33
- import random
34
35
import torch
35
36
36
37
torch .set_default_dtype (torch .float64 )
37
38
torch .set_default_tensor_type (torch .DoubleTensor )
38
39
39
40
from simulai import ARRAY_DTYPE
41
+ from simulai .file import SPFile
40
42
from simulai .optimization import Optimizer , PIRMSELoss , ScipyInterface
41
43
from simulai .residuals import SymbolicOperator
42
44
from simulai .templates import NetworkTemplate , guarantee_device
43
- from simulai .file import SPFile
44
45
45
46
"""#########################################################################"""
46
47
"""REPRODUCIBILITY """
@@ -301,8 +302,8 @@ def adaptative_scale_factors(alpha: float = None):
301
302
activations_funct = "tanh"
302
303
303
304
def model ():
304
- from simulai .regression import SLFNN , ConvexDenseNetwork
305
305
from simulai .models import ImprovedDenseNetwork
306
+ from simulai .regression import SLFNN , ConvexDenseNetwork
306
307
307
308
# Configuration for the fully-connected network
308
309
config = {
@@ -370,10 +371,11 @@ def model_():
370
371
371
372
torch .set_default_dtype (torch .float64 )
372
373
373
- from simulai .templates import NetworkTemplate , guarantee_device
374
374
import numpy as np
375
+
375
376
from simulai .models import ImprovedDenseNetwork
376
377
from simulai .regression import SLFNN , ConvexDenseNetwork
378
+ from simulai .templates import NetworkTemplate , guarantee_device
377
379
378
380
depth = 3
379
381
width = 64
@@ -382,8 +384,8 @@ def model_():
382
384
383
385
# Model used for initialization
384
386
def sub_model ():
385
- from simulai .regression import SLFNN , ConvexDenseNetwork
386
387
from simulai .models import ImprovedDenseNetwork
388
+ from simulai .regression import SLFNN , ConvexDenseNetwork
387
389
388
390
# Configuration for the fully-connected network
389
391
config = {
0 commit comments