To randomly change the brightness, contrast, saturation and hue of an image, we apply ColorJitter(). It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to manipulate the image data.ColorJitter() transformation accepts both PIL and tensor images. A tensor image is a PyTorch tensor with shape [C, H, W], where C is the number of channels, H is the image height, and W is the image width.This transform also accepts a batch of tensor images. A batch of tensor images is a tensor with [B, C, H, W]. B is ... Read More
To crop an image at its center, we apply CenterCrop(). It's one of the transforms provided by the torchvision.transforms module. This module contains many important transformations that can be used to perform manipulation on the image data.CenterCrop() transformation accepts both PIL and tensor images. A tensor image is a PyTorch tensor with shape [C, H, W], where C is the number of channels, H is the image height and W is the image width.This transform also accepts a batch of tensor images. A batch of tensor images is a tensor with [B, C, H, W]. B is the number of ... Read More
To convert a Torch tensor with gradient to a Numpy array, first we have to detach the tensor from the current computing graph. To do it, we use the Tensor.detach() operation. This operation detaches the tensor from the current computational graph. Now we cannot compute the gradient with respect to this tensor. After the detach() operation, we use the .numpy() method to convert it to a Numpy array.If a tensor with requires_grad=True is defined on GPU, then to convert this tensor to a Numpy array, we have to perform one more step. First we have to move the tensor to ... Read More
To mark strikethrough text in HTML, use the … tag. It renders a strikethrough text. HTML deprecated this tag and it shouldn’t be used in HTML5. As an alternative, use the CSS text-decoration property.To use the CSS property, use the style attribute. The style attribute specifies an inline style for an element. The attribute can be used with the HTML tag. Just keep in mind, HTML5 does not support the tag, so the CSS style should be used.ExampleYou can try to run the following code to mark strikethrough text in HTML HTML Strikethrough text ... Read More
To mark superscripted text in HTML, use the … tag. Just keep in mind both the opening and closing tag is mandatory while using the ... tag.The superscript text appears to be half a character above the normal line. It is displayed as a smaller font.You can try the following code to mark superscripted text in HTML. Here, we are writing the value 2 4 using the tag, HTML text superscript Heading Value: 2 4 = 16 Output
Secure Sockets LayerSecure Sockets Layer (SSL) is a protocol for encrypting and authenticating data transferred between a web server and an application. When you or your users enter data on your site, it passes via several touch points before arriving at its eventual destination. Without SSL, this data is transferred as plain text, intercepted, or altered by hostile parties. SSL provides point-to-point encryption to ensure data security during transmission.A message authentication code, or MAC, is included in SSL connections to ensure that data is not lost or altered during transmission. This ensures that the data sent is received without being ... Read More
Whaling AttackA whaling attack is a mode of phishing scam that targets high-ranking executives. Cybercriminals try to dupe their victims into taking adverse actions by impersonating a high-ranking professional. They frequently try to obtain massive wire transfers, sensitive information or infect computers with malware containing misleading links. The latter two indicate that this social engineering method may have long-term effects, as cybercriminals can use the data gathered from a whaling attack to launch additional attacks.Whaling Vs PhisingThe distinction between whaling and other types of phishing lies in the target's specificity.While phishing targets many people at random, and spearphishing targets people ... Read More
Webcam HackingWebcams are a significant privacy worry, especially since they're built into so many of the gadgets we use daily, such as your phone, tablet, or laptop.Webcam hacking is known as camfecting, and it is the act of gaining access to someone's webcam and turning it on without their knowledge. The camera's operator (i.e., the hacker) can view all that the camera can see.The most common way is to infect a victim's computer with malware that allows hackers access to a connected webcam.During the outbreak of the recent pandemic, the number of camfecting, cases has also increased since most people ... Read More
Smartphone sales keep increasing at an exponential rate, and it doesn’t look like it’s going down any time soon. It’s one of the most popular appliances in the world. Such a commodity will obviously be subject to scams.As smartphone technology advances, smartphone frauds are becoming a nuisance. The victims of these frauds might lose anything from a few pounds to their entire life savings. As we become increasingly reliant on these gadgets in our everyday lives, it's critical to be aware of the many sorts of mobile scams and how to prevent them. In this article, we will highlight some ... Read More
Browsing the Internet can expose the users to various types of risks. Others can view a lot of information about you, but they can also obtain bits of information about you just by surfing. Hackers can sell the information they've obtained to advertisers, who can use it to construct buyer profiles and targeted adverts.What is Incognito Mode?Incognito mode is a type of private surfing that leaves fewer tracks. It has the ability to delete temporary data that has been acquired by the PC or gadget you're using.While not all privacy settings are created equal, the majority of private browser settings ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP