mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method Updated the code with f-string methods wherever required for a better and cleaner understanding of the code. * Updated files with f-string method * Update rsa_key_generator.py * Update rsa_key_generator.py * Update elgamal_key_generator.py * Update lru_cache.py I don't think this change is efficient but it might tackle the error as the error was due to using long character lines. * Update lru_cache.py * Update lru_cache.py Co-authored-by: cyai <seriesscar@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -71,7 +71,7 @@ class CNN:
|
||||
with open(save_path, "wb") as f:
|
||||
pickle.dump(model_dic, f)
|
||||
|
||||
print("Model saved: %s" % save_path)
|
||||
print(f"Model saved: {save_path}")
|
||||
|
||||
@classmethod
|
||||
def ReadModel(cls, model_path):
|
||||
@ -303,7 +303,7 @@ class CNN:
|
||||
plt.show()
|
||||
|
||||
print("------------------Training Complished---------------------")
|
||||
print((" - - Training epoch: ", rp, " - - Mse: %.6f" % mse))
|
||||
print((" - - Training epoch: ", rp, f" - - Mse: {mse:.6f}"))
|
||||
if draw_e:
|
||||
draw_error()
|
||||
return mse
|
||||
|
Reference in New Issue
Block a user