on-internet

How would you resolve RuntimeError using clip_grad_value_ of list size = 0 in torch?

Working on a CNN in pytorch and used clip_grad_value( ) to deal with gradients. Which lead to the above exception. Was using autograd.grad( ) to calculate gradients instead of backprop for CIFAR10. I used it after the weight updates in torch.no_grad(). Searched online but to no avail on handling the error. Any ideas to what caused this issue and howe to solve it? Thanks. untimeError: Expected !nested_tensorlist[0].empty() to be true, but got false traceback: R<cell line: 0>() 52 model.fc2.weight.copy_(fc2_tmpw) 53 ---> 54 nn.utils.clip_grad_value_(model.parameters(), clip_value=0.1) 55 #print(

Join the discussion →

Aptera Completes Its First Solar Electric Vehicle for Customer Delivery

Car-maker Aptera announced Thursday it "completed its first vehicle for sale to a customer, a milestone years in the making." Aptera's three-wheeled solar electric vehicle charges from solar panels integrated into its body, and it plugs in like any other electric vehicle. Its built-in solar panels are designed to add up to approximately 40 miles of driving a day from sunlight alone, under favorable conditions. "This is the moment our team has worked toward for years," said Chris Anthony, Co-CEO of Aptera. "To Accelerator #1, and to every reservation holder and shareholder who believed in this

Join the discussion →

GitHub Actions Windows Runner Failure STL 1000: Expected Clang 22 or Newer

Hi all i faced an issue with Windows MSVC and Clang toolchain setup in my CI job on GitHub actions, everything was working correctly until the start of this month where it trigger and internal error : Link C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.52.37025\include\yvals_core.h:923:1: error: static assertion failed: error STL1000: Unexpected compiler version, expected Clang 22 or newer. this is my workflow matrix file, using the native MSVC toolchain everything works, fine but with LLVM and clang it get messy, i am primly using Linux based setup and didn't have muc

Join the discussion →

How to use pointer-to-member with a non-thread address space in Metal?

I have a data type that currently lives in the device address space and I'm currently trying to form a pointer-to-member to it. But whatever I do, the pointee seems to be always in the thread scope even though the parent lives in the device scope. struct InputThing { atomic_uint prm0; atomic_uint prm1; atomic_uint prm2; atomic_uint prm3; }; typedef device InputThing DInputThing; typedef device atomic_uint d_atomic_uint; d_atomic_uint DInputThing::* reference; reference = &DInputThing::prm0; // 🛑 Assigning to 'd_atomic_uint DInputThing::*' from incompatible type 'metal::atomic_uint InputThing::

Join the discussion →

How would you resolve Expected nested_tensorlist[0].size( ) > 0 to be true, but got false using error using autograd.grad( )?

I am using pytorch to train a cnn on CIFAR10 but ysing autograd.grad( ) function to calculate the gradients for the backprop instead of .backward( ) I was having trouble with exploding gradients so I used clip_grad_value_( ) to tame them. This lead to the RuntimeError mentioned above. From searching online I didn't find any resolutions that involved .grad( ). Any suggestions to help resolve this issue? Thanks Traceback: --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /tmp/ipykernel_1898/1925958117.py in <cell line: 0>()

Join the discussion →

How to access MySQL through SSH tunnel and Python script

I am using MobaXterm, and have an SSH tunnel connecting port 9997 and 3306 (MySQL). I can access MySQL fine through the command line, but when I try to access it from a Python script (using python3 myscript.py on the command line), I get the error: DatabaseError: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:9997' (111). Here is myscript.py: import mysql.connector conn = mysql.connector.connect(port=9997, user='---', password='---', database='---') csr = conn.cursor() csr.execute("SELECT * FROM mytable LIMIT 10;") for i in csr: print(i) Why won't it work?

Join the discussion →

Kaggle Account Verification Fails for Both Phone (Uzbekistan +998) and Persona Identity Verification

I'm unable to verify my Kaggle account because both available verification methods fail with errors. 1. Phone Verification I'm using a phone number with the +998 country code (Uzbekistan). Kaggle fails to send the SMS verification code and displays an error. 2. Persona Identity Verification The Persona identity verification process also fails. An error occurs during the FACE ID verification process, preventing me from completing verification. Troubleshooting already attempted: Tried incognito/private browsing mode. Tested multiple browsers. Switched between different networks. Tried different

Join the discussion →
Older stories