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
5
votes
2 answers

CDI in layered architecture. How to inject service object using CDI annotations?

I am developing some application, which consists of three layers: Database access layer (JPA + Hibernate as provider) Business logic layer Presentation layer (JSF 2.0) Before I started I have read some chapters from the book Core JavaServer Faces…
rivasket
  • 377
  • 2
  • 6
  • 18
5
votes
1 answer

how to resize and position Drawables inside a LayerDrawable in Android

I have a LayerDrawable, which should display 5 Bitmaps. 1 background and 4 Icons (which can be different for every LayerDrawable) like a Grid. Unfortunately these Icons don't have the same width than height. My Problem is to resize them, while…
Rafael T
  • 15,401
  • 15
  • 83
  • 144
5
votes
1 answer

Output layer for Binary Classification in Keras

I need to classify images as either cancerous or not cancerous. For this, I built a classical CNN but I am hesitating between labeling my dataset with either two-column vector like this: cancerous: [0, 1] not cancerous: [1, 0] and using a softmax…
Boels Maxence
  • 349
  • 3
  • 16
5
votes
1 answer

How to create a custom layer in Keras with 'stateful' variables/tensors?

I would like to ask you some help for creating my custom layer. What I am trying to do is actually quite simple: generating an output layer with 'stateful' variables, i.e. tensors whose value is updated at each batch. In order to make everything…
5
votes
6 answers

Which layers should be logging for exceptions?

I have one large monolithic application with four layers for specific functional requirements. UI Layer -> Presentation Logic Layer -> Business Logic Layer -> Persistent Layer One minimal working example for call flow can be like, class…
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
5
votes
1 answer

Matplotlib / Imshow / transparent layer everywhere but certain points

I try to plot a layer on an imshow. This layer is based on a matrix where every values are equals to 0 but some specific pixels are equals to 1. If I use the alpha parameter, I'm loosing mycolor as well... How can I have 0% transparency where I…
lelorrain7
  • 315
  • 5
  • 13
5
votes
1 answer

How to make routes tickable inside a layer on a map with folium

I'm creating a program with Python that finds the best routes for workers. It display a map with their itinerary and time of itinerary. I have 3 layers, one for each transport car, metro and bike. When i tick or unticked them it display or erase…
5
votes
1 answer

Why is the conv2d layer requiring a ndim=4 input?

I want to use a 2d Convolutional layer in my network and as input I would like to give it pictures. So I have a batch of pictures which mean a ndim=3 matrix, like this for exemple : dimension of my input: [10, 6, 7] The 10 value is the batch size…
Xeyes
  • 583
  • 5
  • 25
5
votes
2 answers

Get an Guice Injector in a web application

I'm looking how I could get an Injector using Guice in a web application. I already found a solution using ServletContext, but I'm not really satisfied by this solution, because it breaks the layer architecture of the application. I'm not okay with…
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124
5
votes
0 answers

Custom loss function: How to add hidden layer's output in loss function in keras with Tensorflow

In my model, the output of the hidden layer, namely 'encoded', has two channels (eg. shape: [none, 128, 128, 2]). I hope to add SSIM between these two channels in loss function: loss = ssim(input, output) + theta*ssim(encoded(channel1),…
5
votes
1 answer

Keras : How to merge a dense layer and an embedding layer

I use Keras and I try to concatenate two different layers into a vector (first values of the vector would be values of the first layer, and the other part would be the values of the second layer). One of these layers is a Dense layer and the other…
Ed Nio
  • 593
  • 2
  • 11
  • 27
5
votes
1 answer

Swift - How to add a layer on a UIImageView inside of a UICollectionViewCell and keep the parallax effect

I'm working on a tvOS project. This project contains a UICollectionView with a UIImageView inside of each UICollectionViewCell. First of all I'm using adjustsImageWhenAncestorFocused on the image, because it looks good when the cell is in focus and…
Stijn
  • 61
  • 4
5
votes
4 answers

Multi-Shaped CSS Layers \ Non-rectangular CSS Layer

is it possible to make CSS Layers shaped like the following image... i know we can have images of this shape and with transparent backgrounds we can have Layers shaped like these... but no i want CSS Layers to actual borders like these shapes...…
Moon
  • 19,518
  • 56
  • 138
  • 200
5
votes
1 answer

R Leaflet Map - addPolygon geography labels

I am working a an R leaflet Map, this map has census tracts, each with a number associated. Is it possible to have the labels show on the map, either as you scroll in or with the layer control radio buttons. The labels are already in the shape…
sconfluentus
  • 4,693
  • 1
  • 21
  • 40
5
votes
2 answers

DDD: Should a Dto Assembler be a part of Domain Layer?

Thanks in advance. I have some Aggregates in the Domain Layer library. Also, some DTOs in a separate library, which is shared between Server and Client side. An Aggregate of an entity is more informative than its DTO. So, in order to convert from…