Pytorch ResNet18 low performance with CIFAR100 Dataset

Pytorch ResNet18 low performance with CIFAR100 Dataset

When using PyTorch’s provided ResNet18, the performance on the CIFAR-100 dataset is significantly lower than expected—around 30-40% accuracy, which is much lower than its reported benchmark. Why does this happen? PyTorch’s ResNet18 is originally designed for the ImageNet dataset, where images are typically resized to 224×224 or 256×256. The model architecture is optimized for these larger images, particularly in the first convolutional layer, which uses a large kernel size: Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False) Since CIFAR-100…

Read More Read More

Hello!

Hello!

This category is dedicated to research writing. As a current Ph.D. student, I’ve come to realize—after two years—that writing can be both more challenging and more crucial than the research methods themselves, at least for me and at this stage of my journey. Moving forward, I plan to analyze papers from well-known conferences to improve my writing skills. I hope this will be helpful to other researchers who are also grappling with writing (especially myself).

[AWS] Mount EFS on EC2 ubuntu 18.04

[AWS] Mount EFS on EC2 ubuntu 18.04

When the file is not required to be stored permanently but big, S3 might not be the best choice. I recently had to work on a video-related project that requires downloading and analyzing but doesn’t need to be stored after analysis. In our case, the key requirement was accessing files without using S3 over the different EC2 instances. Therefore, we decided to use EFS as a Network File System (NFS). OS: ubuntu 18.04 1. Launch EFS From AWS Management Console,…

Read More Read More

Pip Install Mysqlclient Error

Pip Install Mysqlclient Error

Environment: Ubuntu 18.04 Error 1. OSError: mysql_config not found Solution 1 Error 2. unable to execute ‘x86_64-linux-gnu-gcc’: No such file or directory Solution 2 Error 3. MySQLdb/_mysql.c:46:10: fatal error: Python.h: No such file or directory Solution 3 Final Code Happy Coding!

[AWS] Connect API Gateway to EC2

[AWS] Connect API Gateway to EC2

In this post, we will talk about how to connect the AWS API gateway to EC2. Normally, we use the API gateway to make an API when we are using Lambda. However, for some cases, you might want to use an API gateway as a proxy for the EC2 instance server. Let’s say we have an EC2 instance running the Flask application that we installed from the last post. We want to make an API that is pointing the server…

Read More Read More

Python Current Unix Timestamp

Python Current Unix Timestamp

In Python, to get UNIX timestamp, you need to use the time library like below. Since its type is a float, you need to cast to int if you need. Furthermore, if you want to consider your timezone, you can simply add the hours like below. The following example is the utc+9 case. Happy coding!

How to check if a word is English or not in Python

How to check if a word is English or not in Python

Here I introduce several ways to identify if the word consists of the English alphabet or not. 1. Using isalpha method In Python, string object has a method called isalpha However, this approach has a minor problem; for example, if you use the Korean alphabet, it still considers the Korean word as an alphabet. (Of course, for the non-Korean speaker, it wouldn’t be a problem 😅 ) To avoid this behavior, you should add encode method before call isalpha. 2….

Read More Read More

Javascript replace all

Javascript replace all

In Python, if you use the replace method of string, all the relevant characters are changed, but in javascript, only the first part is changed and no further progress is made. Solution: Use a regular expression Bonus! How can we change two different characters? Solution: Use regular expressions well.