Questions tagged [layer]

This tag is ambiguous. Consider using more specific tags to better reflect the question's content.

This tag is ambiguous. Consider using more specific tags to better reflect the question's content.

If the question relates to Geographic Information Systems, consider whether the question is better suited to the GIS Stack Exchange.

2129 questions
4
votes
1 answer

How to implement low-dimensional embedding layer in pytorch

I recently read a paper about embedding. In Eq. (3), the f is a 4096X1 vector. the author try to compress the vector in to theta (a 20X1 vector) by using an embedding matrix E. The equation is simple theta = E*f I was wondering if it can using…
jason
  • 1,998
  • 3
  • 22
  • 42
4
votes
3 answers

Disable Implicit Animation of CATextLayer.string Property

I have a view with one sublayer of type CATextLayer. I override the views drawRect: method and in there change the CATextLayer.string property to an instance of NSAttributedString. Each time the NSAttributedString has the same text but with…
user224851
4
votes
1 answer

CSS Width auto and float left - Allow to overflow

I've got a container div which has property width: auto;. This container has children elements which have property float: left;. The normal behaviour is to align all the elements continously until one element overflows the container div. In that…
ProtectedVoid
  • 1,293
  • 3
  • 17
  • 42
4
votes
1 answer

Transfer learning from the pre-trained NASnet network. How to know the number of layers to freeze?

In order to train a model for image classification (using Keras or Tensorflow) I want to retrain a certain number of layers of the NASNetMobile, using my own dataset of images. In this paper: https://arxiv.org/pdf/1707.07012.pdf (section A.7) we…
Dídac Royo
  • 229
  • 3
  • 11
4
votes
1 answer

Use layer output in keras custom loss

I am developing a custom loss function in Keras and I need the first layer output. How can I retrieve it? def custom_loss(y_true, y_pred): cross = K.mean(K.binary_crossentropy(y_true, y_pred), axis = 1) layer_output =…
Francesco Pegoraro
  • 778
  • 13
  • 33
4
votes
1 answer

MapClickListener not being called after adding layer on google mapes

Im Implementing layers on google maps in Android using GeoJson Utility Library. Layers only contains Polygons as Features. I can set feature listener as below layer.setOnFeatureClickListener(new GeoJsonLayer.OnFeatureClickListener() { …
Zaid Mirza
  • 3,540
  • 2
  • 24
  • 40
4
votes
0 answers

Passing Click events from GeoJsonLayers to all lower index layers

Im Implementing layers on google maps in Android using GeoJson Utility Library. Layers only contains Polygons as Features. I can set feature listener as below layer.setOnFeatureClickListener(new GeoJsonLayer.OnFeatureClickListener() { …
Zaid Mirza
  • 3,540
  • 2
  • 24
  • 40
4
votes
0 answers

iOS Gradient not perpendicular to gradient vector

I have added a gradient on the component, it is at an angle. This gradient is not perpendicular to the gradient vector. Device iPhone 6s, for convenience, have set the size constant. What could be the problem? class ViewController: UIViewController…
4
votes
1 answer

After Effects: Move a layer after Position keyframes have been added

I'm not sure how to word this question. So here's an example. The animation on a layer slides into view, and bounces back slightly. Easy peasy. The Position Keyframes look something like this: Keyframe 0: (-100,200) Keyframe 10: (100,200) Keyframe…
4
votes
1 answer

Keras, how to get predict with model with removed last layer

Suppose I have dataset 100k x 400. I created this model: model = Sequential() model.add(Dense(200, input_dim = 400, init = init_weights)) model.add(BatchNormalization()) model.add(SReLU()) model.add(Dropout(0.5)) model.add(Dense(200, init =…
gugatr0n1c
  • 377
  • 6
  • 21
4
votes
0 answers

Modifying the look of an NSButton with a CALayer works differently in macOS 10.12 and 10.10

I am trying to change the look of an NSButton in my app. The button is "Square" and "Momentary Push In". The code is: let layer = CALayer() toggleTimespanButton.wantsLayer = true toggleTimespanButton.layerContentsRedrawPolicy =…
hkdalex
  • 717
  • 7
  • 13
4
votes
3 answers

Three Layered Web Application

Is it OK - best practise wise - to use the second layer to redirect the user? For example: public static void ForceLogin() { HttpCookie cookie = HttpContext.Current.Request.Cookies[cookieName]; if (cookie != null) { if…
はると
  • 1,489
  • 8
  • 20
4
votes
1 answer

Leaflet overlay order (points, lines, and polygons)

I'm working with the Leaflet.StyledLayerControl plugin and would like to set my layers so that polygons always get pushed to the back, lines above the polygons, and points above the lines. I have searched for solutions here but most refer to…
Alex G.
  • 77
  • 1
  • 8
4
votes
0 answers

Worldwind Render Order of Surface Shapes and Tactical Symbols

Essentially, I would like Surface Shapes to be rendered on top of Tactical Symbols by default. Here is the problem recreated in a Worldwind Example public class TestApp extends ApplicationTemplate { public static class AppFrame extends…
Steve
  • 981
  • 1
  • 8
  • 22
4
votes
0 answers

iOS - Push notification with Layer.com

I try to push notification with Layer API by: let text = "Hello world" var error: NSError? let part = LYRMessagePart(text: text) let message = layerClient.newMessageWithParts([part], options: [LYRMessageOptionsPushNotificationAlertKey : text],…
maphongba008
  • 2,114
  • 4
  • 20
  • 33