Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. P

    Python Tried many times to fix the string prediction problem but...

    So you're saying these two lines of code: This>>> model.fit(X_train, y_train, batch_size=BATCH_SIZE, epochs=10) ...and this>>> arrays = read_strings(file_path) ...are connected - and that commenting out this line: arrays = read_strings(file_path) ...is a bad idea? By the way, isn't it that...
  2. P

    Python Ran into trouble for a string-prediction problem...

    Just revised that code and it's giving me new error messages now...
  3. P

    Python Tried many times to fix the string prediction problem but...

    I am running this code below: # Import modules import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers """ This module is a string prediction model using LSTM. It takes a...
  4. P

    Python Ran into trouble for a string-prediction problem...

    What about the other error messages? I'm thinking that if I fix the problem at line 37 - but not fix the others specified in the other errors - it may make the problem a lot worse...
  5. P

    Python Ran into trouble for a string-prediction problem...

    Can you figure out what the error messages here mean? Traceback (most recent call last): File "D:/Python/stringpred ver01.py", line 37, in <module> X_test = np.reshape(X_test, (-1, 5)) File "<__array_function__ internals>", line 200, in reshape File...
  6. P

    Python Ran into trouble for a string-prediction problem...

    This is concerning the source code I am developing: # Import modules import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers # Define the file path and name file_path =...
  7. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    Seriously, your unit is enough to make me cry an ocean! 😭 I'd kill just to have that kind of computer! What Python version are you using? 🫤 Wait, are you even using Python - or, are you working using the latest version of Anaconda? 🤔
  8. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    Just curious: what are the specs of the computer you're using (both hardware specs and your operating system specs)?
  9. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    That's funny - when I use the online editor I mentioned here, I don't get that output. And why is it on your end you're getting more than six characters? It should display only "2 2 2 2 2 2" - worse still, why is it only purely "2"? It should show like "5 4 4 2 3 0", "0 0 0 3 3 1", or something...
  10. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    By the way, I made some edits to the code after reading your ideas here: import numpy as np from scipy import ndimage database = """5 3 4 5 1 2 1 3 1 5 0 4 2 3 0 5 1 2 0 5 4 0 5 2 1 1 0 5 2 4 4 1 4 3 0 0 4 3 3 3 2 3 2 3 3 1 4 1 4 2 3 3 1 1 2 3 1 4 4 2 0 2 3 4 2 2 3 4 5 4 5 1 2 4 3 1 0 2 2 1 2...
  11. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    Regarding that AWS service, can't afford that. $3 per hour converted into our currency is damn expensive...
  12. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    How about question number two? Anyway, just complied the code you gave me and this error message showed up: File "script.py", line 5 strings = database.split ("\n") ^ IndentationError: expected an indented block What does that mean?
  13. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    How about question number 2? Anyway, something came up: just ran the code you gave me and it yielded this error message: File "script.py", line 5 strings = database.split ("\n") ^ IndentationError: expected an indented block What does that mean?
  14. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    I hope you won't mind me asking these additional side questions: 1) The code here somewhat dabbles into machine learning, but in spite of my hardware limits (pretty old CPU and 2GB memory in a two-decade old Samsung netbook) and software limits (Python 3.8.10 running in a 32-bit Windows 7 OS)...
  15. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    So, in revising the code, must I do it this way? import numpy as np from scipy import ndimage def predict_next_string(database): # Split the database into a list of strings strings = np.array(database.split('\n')) #last_two_strings = ndimage.laplace(strings.astype(bool)...
  16. P

    Python Compiles Python code with no error but giving out no output - what's wrong with it?

    Am running Python 3.8.10 in a 32-bit Windows 7 computer with only 2GB memory and no video card (not even an NVIDIA) - it's a two decade old netbook... Tried running the following code: import numpy as np from scipy import ndimage def predict_next_string(database): # Split the database into a...
  17. P

    Python What is the Python Implementation for This?

    I have a Windows text file with the following info inside it: 25 05 38 26 53 04 07 45 50 33 19 34 55 25 21 30 09 39 26 11 30 12 13 41 32 23 44 11 50 39 45 30 07 44 55 54 21 10 35 46 48 27 52 41 05 53 11 50 40 38 17 43 10 54 45 27 29 12 39 31 24 42 38 02 18 09 13 43 28 06 53 30 45 47 29 30 53 13...
Back
Top Bottom