Skip to content

local variable 'opt_Learning_Rate2' referenced before assignment #112

@ShawnBio

Description

@ShawnBio

Hi, my codes encounter a bug:
local variable 'opt_Learning_Rate2' referenced before assignment
My codes are below.

from GENetLib.sim_data import sim_data_scalar
from GENetLib.grid_scalar_ge import grid_scalar_ge
ytype = 'Survival'
num_hidden_layers = 2
nodes_hidden_layer = [500, 1000]
learning_rate2 = [0.035, 0.045]
Lambda = [0.1]
learning_rate1 = [0.04, 0.05]
lambda2 = [0.07, 0.09]
num_epochs = 100
scalar_survival_linear = sim_data_scalar(rho_G = 0.25, rho_E = 0.3, dim_G = 500, dim_E = 5, n = 1500, dim_E_Sparse = 2, ytype = 'Survival', n_inter = 30)
y = scalar_survival_linear['y']
G = scalar_survival_linear['G']
E = scalar_survival_linear['E']
grid_scalar_ge_res = grid_scalar_ge(y, G, E, ytype, num_hidden_layers, nodes_hidden_layer, num_epochs,
              learning_rate1, learning_rate2, lambda1 = None, lambda2 = lambda2, Lambda = Lambda, threshold = 0.05)

Where is the problem actually?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions