Issue with viewing data transformation with PyTorch - pytorch

I am currently trying to process data for a simple network. This is the code I entered:
Screenshot here
I keep getting this error message but can't find any syntax problems or anyone else with this issue, I'm guessing it's something to do with my vienv because I've seen tutorials of people with no issues and that exact code. It's possible I haven't imported a package into my IDE and I am using anaconda and PyCharm if that helps.
Anyway, this is the error message I keep getting.
Error Message

You need to use transforms.ToTensor() instead of transforms.ToTensor when passing to transforms.Compose.

Related

The system cannot find the path specified. ; No such process [Op:ReadFile]

I looked for different ways to solve this error... Even though I am not an advanced programmer I am trying to learn how to use machine learning. I am working in vs code(.ipynb file, tf(python 3.10.8)) using all extensions, TensorFlow installed(2.10.0). Please help if you know the answer, but not the reinstalling tenser one, since I have already tried it.
code
error
error
Then I put it in c: where the packages were installed and got the next thing: error2
If you need any additional information, please ask.

Could not find QtWebEngineProcess.exe

I was building an application(Equation solver) in PyQt5 which contains two frames.
The first frame works just fine but the 2nd frame contains a QWebEngine widget which worked fine when I directly ran it from the code in my code editor but when I converted into an .exe
file using cx_freeze, on running the second frame I get an error saying "Could not find QtWebEngineProcess.exe" .
I did a little bit of digging myself and found out that its quite common actually, even found a question similar to this in stack overflow : here.
I tried adding the qt.conf file but to no avail, the error still persists.
I am at a loss here, been working on this for so long and now this error really ruined the flow.
I would be very grateful for any kind of help.
Thanks.

Anylogic error when connecting Excel-database: "Event Loop Exception null"

Whenever I want to connect an Excel-database the following error message pops up:
Event Loop Exception
null
It happens when I want to access the Excel-file by "Database - Create or import a table..." and also when I want to access it by an agent population.
Does anyone know how to fix this problem?
I've contacted Anylogic and it is a known bug, they will fix it by the new release, to solve it the quick fix is:
As for now, there is a workaround - you may close AnyLogic, clear Workspace8.7 folder (C:\Users<username>.AnyLogicEditionName\Workspace8.7), and try importing data again.
This bug delayed my research work for about 2 days. Luckily, I had an older version of Anylogic (8.7.3) on one of my old laptops. That's what I'm using now. Download the older version of Anylogic (without this bug) from the link below:
https://files.mycloud.com/home.php?seuuid=fa53e0c5f116ed57167a468c527bf8bd&name=Anylogic%20874&brand=webfiles
Alternative Link:
https://home.mycloud.com/action/share/442fbbea-7acd-410f-aabb-f0edc9a0a62d

Length issue in Python3

I am taking an Ethical Hacking class, and my lab for the week is trying to crack passwords created by our professor. For this specific challenge, I used a 64 bit decoder to translate his string in his code, and have found the way to solve the problem.
The issue is when I run the equation found in the code, I run into an error in Python. I'll attach an image for clarification. I do know that length is typically found using len() but I don't know how to use that in this context. The part giving me issues is the [chunk2.length-1].
I was informed to add the errors I am receiving so here it is:
you = chunk1[2+1]+d[1+1]+h[3]+chunk2[chunk2.length-1] AttributeError: 'str'
object has no attribute 'length'
Any help provided would be great, thank you guys.
I changed chunk2[chunk2.length-1] to chunk2[-1] and that solved my issue.

No module named 'line_profiler._line_profiler' when calling line_profiler

I intended to test my code with line_profiler in the following way in Pycharm but got an error just like the title said. I tried in both miniconda 3.8 and python 3.7 (Windows) but got the same error and I don't know how to fix that. I visited the github page where the source code lies and also tried to run my python file as a script. In the end, all attempts failed because of this error. It seems like a bug but I found everything is Okay in Colab. Can anyone give me any advice? Feel free to leave comments and I will appreciate that.
lp = LineProfiler()
lp_wrapper = lp(Solution) # Solution is the name of self-defined function
lp_wrapper()
lp.print_stats()

Resources