Questions tagged [gradient]

Specifies a range of position-dependent colors, usually used to fill a region.

Filter by
Sorted by
Tagged with
1 vote
0 answers
17 views

Use indexer to cast batched input tensor into different Sequentials

I'm having troubles in the following scenario: Suppose we have an indexer tensor (or vector for that case) that, for example, contains these values: tensor([0,1,1,0]). Also, let's suppose I have a ...
1 vote
0 answers
10 views

Vega-Lite gradient for line chart

I would like to colour a line above a certain threshold in one colour and below the threshold another colour (see image below). How would I go about doing this? I've tried using gradients and the ...
  • 627
0 votes
0 answers
10 views

tensorflow : gradient of adaptative function learnable parameters is zero (elu)

I would like to know how to create an adaptative elu function with trainable weights for each unit. So I tried to implement this elu, but it seems that the gradient tape doesnt work because of the ...
0 votes
0 answers
14 views

Gradient does not recognize type of TypedStruct structures

Background I have a module that uses TypedStruct to create structs. This is the code: defmodule Shared.Data.Authorization do @moduledoc """ Saves authorization details for a user. ...
0 votes
0 answers
26 views

Generate color gradient array using Javascript

Note: I want to accomplish this using a simple js, without using a library. I have a text with inputs are specified below const str = "The Gradient Legacy"; var n = str.length startColor = &...
  • 2,973
0 votes
1 answer
21 views

tf.gradient returning None values

I am trying to setup integrated gradients on my multi-input arm LSTM classifier, however when calling tensorflow gradient it is returning all None values. I am not really sure what the problem is, it ...
0 votes
2 answers
40 views

Apply Text Color Gradient During Text Output Animation (HTML, CSS, JS) without showing HTML tags

I have a text animation that loads when the page loads. The text will be written to the screen character by character, I want to have some words with a gradient applied. I have been able to ...
  • 546
0 votes
0 answers
18 views

Is my custom PyTorch loss function differentiable

I have a custom forward implementation for a PyTorch loss.Does the path from pred to loss_all can be differentiable? Or do I use non-differentiable calculation operations in my code? Here is the ...
1 vote
1 answer
46 views

Creating simple left right gradient with top down alpha swift UIView

Would like to create simple custom UIView that fades from red to blue horizontally and then both colors have alphas that fade downwards to zero (so the top of the view is red to blue and the bottom is ...
0 votes
1 answer
29 views

CSS Radial Gradient Styling

I am trying to build banner with background that has radial gradient. I think I am close but cannot make my code exactly as design. Any help would be highly appreciated. I am not able to get proper ...
  • 1
0 votes
0 answers
19 views

How can I see/store the number of jacobian evaluation for each iteration at python scipy.minimize for method of 'SLSQP'?

I want to store and see the number of gradient evaluations for each iteration while using minimize with the method of SLSQP. However, I can only see the total number of jacobian evaluation. I tried to ...
-1 votes
0 answers
17 views

Compute partial derivative for an irregular shape

My particular interest is to compute the partial derivatives for a cube with a spherical hole removed. I import the data set as 1D arrays and then interpolate on the data with defining a grid and ...
0 votes
1 answer
27 views

create a fantasy border or a line with css

I have a font icon and it has a border bottom (or a line doesn't matter) like this I try to create something like this but I can't. I used radial-gradient to achieve it but I don't know if I did the ...
  • 1,056
0 votes
1 answer
29 views

Gradient text with partial underline using CSS

I'm trying to achieve the style in the image below using CSS. I've seen other similar questions, however, they either only have gradient on the underline, or underline the entire text. I want to be ...
0 votes
0 answers
16 views

Sort by key in Pytorch

Hi I have a question about pytorch. I want to sort(dim = 1) tensor of size(b, c, h, w) using key tensor (same size as before). However, key tensor must can update gradient. So It cannot use torch....
0 votes
1 answer
34 views

CSS Gradient Border with Rounded Corners has Unexpected Gap Between Background and Border

I am looking to create a button with a gradient border that fades-in and out on hover: Codepen here: background: linear-gradient(rgb(25, 25, 25), rgb(25, 25, 25)) padding-box, linear-gradient(160deg, #...
  • 347
0 votes
0 answers
11 views

computing loss and gradient with class weights from unbalanced classes

I have 3 extremely unbalanced classes, and a neural net with softmax activation on top. Let's say both class weights and predicted outputs are numpy arrays, and for a number of reasons I cannot use ...
  • 13
2 votes
1 answer
50 views

gnuplot : plot function using palette/gradient linecolor : seems uniform, not gradient

What does gnuplot need to plot the line of a function** using the palette linecolor i.e. as a gradient? (I tried terminal wxt 0 enhanced and svg, but will try more)? The documentation says palette is &...
0 votes
0 answers
8 views

Catching tensorflow packets ( TCP packets ) for averaging gradients in Parameter server architechture

I am using tensorflow version 1.15.0 python version 3 and a single CPU I am trying to find a way to figure out what is the actual data sent between a parameter server and a worker in order to gather ...
0 votes
0 answers
54 views

QLinearGradient pyqt5 doesn't working with QLabel

In qt designer creating QLabel and set styleSheet: font: bold 50px; color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(13, 115, 119, 255), stop:1 rgba(78, 204, 163, 255)); But ...
-3 votes
0 answers
27 views

Create a ball css gradient as in image

i want to make the ball same as in image using css but i am not able to create the same gradient that is in image enter image description here I want to make the ball same as in image using css also ...
0 votes
0 answers
35 views

Shape of the gradient in tensorflow

I cannot understand how the x vector of shape (3,1) and the w vector of (1,2) shape give [6.,6.] as a result of this snippet. Can anybody explain to me , how the values are produced? import tensorflow ...
0 votes
0 answers
17 views

Android Compose : background on Pager

I have a vertical VerticalPager with 2 pages. I would like to make a background (for my case it is a gradient which begin on top of page 1 and finish at the bottom of page 2. It is possible in Android ...
  • 381
0 votes
2 answers
47 views

Training loss is always decreasing

I am training PyTorch model for binary classification and my input vector of length 561 [341 is one hot encoding] and the others are features between 0 and 1. my output is [0,1] or [1,0] . My issue is ...
0 votes
1 answer
34 views

How can I draw the gradient Polyline with points in Here Map Angular Project?

I am building a website using Angular with Here Map. I am using Here Map Api I tried to draw a gradient line with Polyline but it is not working and I can't know how I can do it. Here is my code. ...
0 votes
0 answers
33 views

How to make CSS instagram Text gradient Color to react native gradient color

background: linear-gradient(143.9deg, #515BD4 10.72%, #8134AF 30.19%, #DD2A7B 52.42%, #F58529 75.45%, #FEDA77 90.88%); <MaskedView maskElement={<Text {...props} />}> <...
1 vote
2 answers
54 views

Can I animate the background to rotate instead of the element? [duplicate]

I created a box with a gradient border, and I'd like to animate that gradient so it's doing a 360 rotation. With the code I'm currently working on, instead of the gradient background itself rotating, ...
0 votes
1 answer
35 views

Flowbite Tailwind | Purple gradient background of navbar

I'm a complete newbie to Flowbite Tailwind, so please don't assume any previous knowledge :) I'd like a navbar with a purple gradient background. There is no gradient background navbar example in the ...
1 vote
0 answers
26 views

Regarding the np.gradient routine

I am trying to understand np.gradient() routine for 2D arrays. In the example provided in the documentation, we have: dx = 2. y = [1., 1.5, 3.5] np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=...
0 votes
1 answer
24 views

Transforming Linear Gradients Individually For Each Element

Just wanted to double check whether I understand this correctly: If I want to use linear gradients on SVG elements, like <rect>, I need to first put the <linearGradient> inside the <...
  • 601
0 votes
3 answers
82 views

Vertical fade and different color on horizontal

How can we create linear gradient with different colors and fade from top to bottom (vertical fading) with qml or javascript? Or can with fragment? is there any tutorial!! In other words, combine two ...
  • 422
0 votes
1 answer
15 views

How to get the gradients of network parameters for a derivative-based loss?

I have a network y(x) for which I have a given dataset dy(x). That is, I know the derivative of y for a certain x but I do not know y itself. A minimal example of this is: import torch # Define ...
1 vote
2 answers
77 views

How do I make a slider in HTML that fill itself in behind with a gradient

I'm just playing around in HTML and I wanted to make a slider that fills itself in with a gradient, and I found this close to being impossible. I have been researching for hours and I can't seem to ...
  • 13
0 votes
0 answers
45 views

Gradient dialog flutter

I want to create a dialog same as this image. But my gradient not same the gradient of background and button. My output My code: showDialog( context: context, builder: (BuildContext ...
  • 23
0 votes
0 answers
74 views

How to change gradient color of qr code image generated by python's module qr code?

I am using python qrcode module I am trying to change the gradient color of the qr image generated by this code: qr = qrcode.QRCode( version=1, error_correction=qrcode....
  • 11
0 votes
0 answers
13 views

How to determine the step size linearly in gradient descent

I have an objective function (f) that needs to be solved optimally by gradient descent, however, I don't know how to determine the step size. I learned about a linear approach to determining the step ...
  • 19
0 votes
1 answer
55 views

How to create gradient border for Container in Flutter

Figma design I am having difficulty creating a border for a Container in which the color is a gradient. The design is based on a Figma design that I have to code. My idea of wrapping an outer ...
0 votes
0 answers
19 views

Background Clip property issue on screen resizing [duplicate]

I am creating a little site with the help of HTML/CSS. I am using this code to add linear gradient to my text: background-image: linear-gradient(-86deg, #F11267, #FF417C); -webkit-background-clip: ...
0 votes
0 answers
19 views

CAGradient not showing when locations are <0 or >1

I am trying to make a label with an animated gradient as its colour. I can get a static gradient just fine. I was playing around with animated gradients in a view with the intention of using a mask ...
0 votes
1 answer
31 views

ggplot & colors: is it possible to create a fixed gradient of colors across different plots?

When I specify a scale of colors with ggplot, it plots the variable assigning a shade of color according with the gradient it creates using the values of the variable. For example: ggplot(aes(fill = ...
  • 169
1 vote
0 answers
17 views

Clip a single fixed position global gradient anywhere in dom

I'm trying to set up an effect like telegrams chat scrolling, where there is a global gradient positioned relative to the screen (fixed), and any element that is at the top of the screen would be a ...
  • 2,712
0 votes
0 answers
28 views

2d laplacian computation in tensorflow

I want to do a toy code computing the laplacian of the function f(x,y) = sin(pi (x+1)/2)*sin(pi (y+1)/2) for (x,y) in [-1,1]^2. I have tried multiple methods: The first one works the second one has a ...
0 votes
0 answers
13 views

get a gradient theme for entire flutter app

how can i get a gradient theme for entire flutter app , is there any modification in theme data , also theme chaniging is need, using container gradient is simple for one page but needed it for many ...
0 votes
1 answer
39 views

creating a gradient as background color from image colors in css

hi so I'm trying to change the background color of a div when I hover over it, in this div I have an image and some text. how can I change the background color into a gradient based on the image in ...
-2 votes
1 answer
41 views

Make a radial gradient in edge [closed]

I am trying to make a radical gradient in edge but it doesn't work : background-image: radical-gradient(#3A3456, #211E2E); Do you know why and can you give a solution to my problem pls? Thanks I also ...
1 vote
2 answers
58 views

How do i make a div continue linear gradient of its' grandparent? [duplicate]

body { margin: 0; padding: 0; background: linear-gradient(180deg, #2a5470 25%, #4c4177 100%); } .border { padding: 10px; border-radius: 20px; background-image: linear-gradient(25deg, #...
0 votes
1 answer
58 views

css code to lighten the page as the page is scrolled down

I have created a sample page with a fixed background. I want the page to lighten up as the page is scrolled down. * { margin: 0; padding: 0; box-sizing: border-box; } body { background-image: ...
  • 3
1 vote
0 answers
35 views

How to apply gradient shadow color in StackedAreaChart of "@rainbow-me/animated-charts" library?

I'm using this library to make a StackedAreaChart. It's currently working but I need to change the colors to gradients.Only I am able to plot points using the data,I want the gradient colors to be ...
0 votes
1 answer
44 views

Set opacity for background with linear gradient [duplicate]

my problem is the following: I have a div, that is just a background and has other tags inside. I apply the following background to the div: background: linear-gradient(158.72deg, rgba(255, 255, 255, ...
  • 1
0 votes
0 answers
26 views

How can I set gradient colors on AppBar with conditions?

I want to set gradient colors on AppBar according to the user's level. What's wrong in this code? return Scaffold( appBar: AppBar( flexibleSpace: Container( decoration: const ...

1
2 3 4 5
85