Skip to content

Commit

Permalink
Consistent verbose behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
SkBlaz authored Mar 24, 2024
1 parent f685425 commit 7299315
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions deepctr_torch/models/basemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def __init__(self, feature_columns, feature_index, init_std=0.0001, device='cpu'
self.embedding_dict = create_embedding_matrix(feature_columns, init_std, linear=True, sparse=False,
device=device)

# nn.ModuleDict(
# {feat.embedding_name: nn.Embedding(feat.dimension, 1, sparse=True) for feat in
# self.sparse_feature_columns}
# )
# .to("cuda:1")
for tensor in self.embedding_dict.values():
nn.init.normal_(tensor.weight, mean=0, std=init_std)

Expand Down Expand Up @@ -227,8 +222,9 @@ def fit(self, x=None, y=None, batch_size=None, epochs=1, verbose=1, initial_epoc
callbacks.model.stop_training = False

# Train
print("Train on {0} samples, validate on {1} samples, {2} steps per epoch".format(
len(train_tensor_data), len(val_y), steps_per_epoch))
if verbose > 0:
print("Train on {0} samples, validate on {1} samples, {2} steps per epoch".format(
len(train_tensor_data), len(val_y), steps_per_epoch))
for epoch in range(initial_epoch, epochs):
callbacks.on_epoch_begin(epoch)
epoch_logs = {}
Expand Down

0 comments on commit 7299315

Please sign in to comment.