Skip to content

Commit

Permalink
remove the explicit input_shape arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff authored and RoyStegeman committed Jun 18, 2024
1 parent ec43880 commit e5ca1ed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions n3fit/src/n3fit/backends/keras_backend/base_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def apply_dense(xinput):
"dense": (
MultiDense,
{
"input_shape": (1,),
"replica_seeds": None,
"base_seed": 0,
"kernel_initializer": "glorot_normal",
Expand All @@ -148,7 +147,6 @@ def apply_dense(xinput):
"single_dense": (
Dense,
{
"input_shape": (1,),
"kernel_initializer": "glorot_normal",
"units": 5,
"activation": "sigmoid",
Expand All @@ -158,7 +156,6 @@ def apply_dense(xinput):
"dense_per_flavour": (
dense_per_flavour,
{
"input_shape": (1,),
"kernel_initializer": "glorot_normal",
"units": 5,
"activation": "sigmoid",
Expand Down
5 changes: 1 addition & 4 deletions n3fit/src/n3fit/model_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def pdfNN_layer_generator(
)

# Evolution layer
layer_evln = FkRotation(input_shape=(last_layer_nodes,), output_dim=out, name="pdf_FK_basis")
layer_evln = FkRotation(output_dim=out, name="pdf_FK_basis")

# Normalization and sum rules
if impose_sumrule:
Expand All @@ -593,7 +593,6 @@ def pdfNN_layer_generator(

compute_preprocessing_factor = Preprocessing(
flav_info=flav_info,
input_shape=(1,),
name=PREPROCESSING_LAYER_ALL_REPLICAS,
replica_seeds=seed,
large_x=not subtract_one,
Expand Down Expand Up @@ -753,7 +752,6 @@ def layer_generator(i_layer, nodes_out, activation):
kernel_initializer=initializers,
units=int(nodes_out),
activation=activation,
input_shape=(nodes_in,),
basis_size=basis_size,
)
layers.append(layer)
Expand All @@ -775,7 +773,6 @@ def layer_generator(i_layer, nodes_out, activation):
),
units=nodes_out,
activation=activation,
input_shape=(nodes_in,),
regularizer=reg,
)

Expand Down
2 changes: 1 addition & 1 deletion n3fit/src/n3fit/msr.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate_msr_model_and_grid(
)([x_divided, pdf_xgrid_integration])

# 4. Integrate the pdf
pdf_integrated = xIntegrator(weights_array, input_shape=(nx,))(pdf_integrand)
pdf_integrated = xIntegrator(weights_array)(pdf_integrand)

# 5. THe input for the photon integral, will be set to 0 if no photons
photon_integral = Input(shape=(replicas, 1), batch_size=1, name='photon_integral')
Expand Down

0 comments on commit e5ca1ed

Please sign in to comment.